using System; using System.Threading.Tasks; using Tiobon.Core.Common; using Tiobon.Core.Common.DB; using Tiobon.Core.IRepository.Base; using Tiobon.Core.IServices; using Tiobon.Core.Model.Models; using Tiobon.Core.Services.BASE; namespace Tiobon.Core.Services { public partial class PasswordLibServices : BaseServices, IPasswordLibServices { IBaseRepository _dal; public PasswordLibServices(IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; } [UseTran(Propagation = Propagation.Required)] public async Task TestTranPropagation2() { await _dal.Add(new PasswordLib() { IsDeleted = false, plAccountName = "aaa", plCreateTime = DateTime.Now }); return true; } [UseTran(Propagation = Propagation.Mandatory)] public async Task TestTranPropagationNoTranError() { await _dal.Add(new PasswordLib() { IsDeleted = false, plAccountName = "aaa", plCreateTime = DateTime.Now }); return true; } [UseTran(Propagation = Propagation.Nested)] public async Task TestTranPropagationTran2() { await _dal.Add(new PasswordLib() { IsDeleted = false, plAccountName = "aaa", plCreateTime = DateTime.Now }); return true; } } }