1234567891011121314151617181920212223242526 |
- using Microsoft.EntityFrameworkCore;
- using MTWorkHR.Core.Entities;
- using MTWorkHR.Core.IDto;
- using MTWorkHR.Core.IRepositories;
- using MTWorkHR.Infrastructure.Entities;
- using MTWorkHR.Infrastructure.DBContext;
- namespace MTWorkHR.Infrastructure.Repositories
- {
- public class MeetingRepository : Repository<Meeting>, IMeetingRepository
- {
- private readonly DbSet<Meeting> dbSet;
- public MeetingRepository(HRDataContext context) : base(context)
- {
- dbSet = context.Set<Meeting>();
- }
- public async Task<Meeting> GetByIdWithAllChildren(long id)
- {
- return await dbSet
- .Include(x => x.MeetingUsers)
- .FirstOrDefaultAsync(x => x.Id == id);
- }
- }
- }
|