添加项目文件。
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using GroupService.Domain.Entities;
|
||||
using GroupService.Domain.IReposities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace GroupService.Infrastructure.Reposities
|
||||
{
|
||||
public class GroupInvitationReposity : IGroupInvitationReposity
|
||||
{
|
||||
private readonly GroupDbContext db;
|
||||
|
||||
public GroupInvitationReposity(GroupDbContext db)
|
||||
{
|
||||
this.db = db;
|
||||
}
|
||||
|
||||
public void Create(GroupInvitation invitation)
|
||||
{
|
||||
db.GroupInvitations.Add(invitation);
|
||||
}
|
||||
public async Task<GroupInvitation?> FindByIdAsync(Guid id)
|
||||
{
|
||||
return await db.GroupInvitations.FirstOrDefaultAsync(x => x.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user