Code for ReservationRepository.cs is different.
In the blog:
public async Task<List<T>> GetAll<T>()
{
return await _myHotelDbContext
.Reservations
.Include(x => x.Room)
.Include(x => x.Guest)
.ProjectTo<T>()
.ToListAsync();
}
In the repository:
public async Task<List<T>> GetAll<T>()
{
return await GetQuery().ProjectTo<T>().ToListAsync();
}
Which one to use? Is the blog outdated or the repo?
Code for
ReservationRepository.csis different.In the blog:
In the repository:
Which one to use? Is the blog outdated or the repo?