0
I created this method, however I get the error described above, someone knows a possible solution?
public IEnumerable<Reserva> GetBookingsByRoomId(int Id)
{
HotelEntities db = new HotelEntities();
var allBookings = db.Reserva.GetAll().ToList();
var bookings = (from Quarto
in db.Quarto
where Quarto.ID_Quarto == Id
select Quarto
).ToList();
return Mapper.Map<List<Reserva>, List<Reserva>>(bookings);
}
but what mistake does it make?
– HudsonPH
var allBookings = db.Reserva.GetAll().ToList();
where I have getall()... it tells me that dbSet<Reserve> does not contain a definition for getAll()...– John
within this Hotelentities has the getall method?
– HudsonPH
If there is still need, I found now also: https://stackoverflow.com/a/32855426
– Adilson Pereira Silva