forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitOfWork.cs
More file actions
51 lines (33 loc) · 1.82 KB
/
UnitOfWork.cs
File metadata and controls
51 lines (33 loc) · 1.82 KB
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
using L2dotNET.Repositories.Contracts;
namespace L2dotNET.Repositories
{
public class UnitOfWork : IUnitOfWork
{
public UnitOfWork() { }
public UnitOfWork(IPlayerRepository playerRepository, IAccountRepository accountRepository, IServerRepository serverRepository, ICheckRepository checkRepository, IItemRepository itemRepository, ISkillRepository skillRepository)
{
_playerRepository = playerRepository;
_accountRepository = accountRepository;
_serverRepository = serverRepository;
_checkRepository = checkRepository;
_itemRepository = itemRepository;
_skillRepository = SkillRepository;
}
public void Commit() { }
public void Dispose() { }
#region REPOSITORIES
private IPlayerRepository _playerRepository;
public IPlayerRepository PlayerRepository => _playerRepository ?? (_playerRepository = new PlayerRepository());
private IAccountRepository _accountRepository;
public IAccountRepository AccountRepository => _accountRepository ?? (_accountRepository = new AccountRepository());
private IServerRepository _serverRepository;
public IServerRepository ServerRepository => _serverRepository ?? (_serverRepository = new ServerRepository());
private ICheckRepository _checkRepository;
public ICheckRepository CheckRepository => _checkRepository ?? (_checkRepository = new CheckRepository());
private IItemRepository _itemRepository;
public IItemRepository ItemRepository => _itemRepository ?? (_itemRepository = new ItemRepository());
private ISkillRepository _skillRepository;
public ISkillRepository SkillRepository => _skillRepository ?? (_skillRepository = new SkillRepository());
#endregion
}
}