forked from anjoy8/Blog.Core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPasswordLibServices.cs
61 lines (53 loc) · 1.62 KB
/
PasswordLibServices.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Threading.Tasks;
using MineCosmos.Core.Common;
using MineCosmos.Core.Common.DB;
using MineCosmos.Core.IRepository.Base;
using MineCosmos.Core.IServices;
using MineCosmos.Core.Model.Models;
using MineCosmos.Core.Services.BASE;
namespace MineCosmos.Core.Services
{
public partial class PasswordLibServices : BaseServices<PasswordLib>, IPasswordLibServices
{
IBaseRepository<PasswordLib> _dal;
public PasswordLibServices(IBaseRepository<PasswordLib> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
[UseTran(Propagation = Propagation.Required)]
public async Task<bool> TestTranPropagation2()
{
await _dal.Add(new PasswordLib()
{
IsDeleted = false,
plAccountName = "aaa",
plCreateTime = DateTime.Now
});
return true;
}
[UseTran(Propagation = Propagation.Mandatory)]
public async Task<bool> TestTranPropagationNoTranError()
{
await _dal.Add(new PasswordLib()
{
IsDeleted = false,
plAccountName = "aaa",
plCreateTime = DateTime.Now
});
return true;
}
[UseTran(Propagation = Propagation.Nested)]
public async Task<bool> TestTranPropagationTran2()
{
await _dal.Add(new PasswordLib()
{
IsDeleted = false,
plAccountName = "aaa",
plCreateTime = DateTime.Now
});
return true;
}
}
}