26 lines
693 B
C#
26 lines
693 B
C#
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);
|
|
}
|
|
}
|
|
}
|