-
Notifications
You must be signed in to change notification settings - Fork 14
/
InvitationService.cs
33 lines (28 loc) · 944 Bytes
/
InvitationService.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
using Accounting.Business;
using Accounting.Database;
namespace Accounting.Service
{
public class InvitationService
{
private readonly string _databaseName;
public InvitationService(string databaseName = DatabaseThing.DatabaseConstants.Database)
{
_databaseName = databaseName;
}
public async Task<Invitation> CreatAsync(Invitation invitation)
{
var factoryManager = new FactoryManager(_databaseName);
return await factoryManager.GetInvitationManager().CreateAsync(invitation);
}
public async Task<int> DeleteAsync(Guid guid)
{
var factoryManager = new FactoryManager(_databaseName);
return await factoryManager.GetInvitationManager().DeleteAsync(guid);
}
public async Task<Invitation> GetAsync(Guid guid)
{
var factoryManager = new FactoryManager(_databaseName);
return await factoryManager.GetInvitationManager().GetAsync(guid);
}
}
}