c# - How to filter "Include" entities in entity framework? -
entities: public class room { public room() { this.reservations = new hashset<reservation>(); } public int id { get; set; } public decimal rate { get; set; } public int hotelid { get; set; } public virtual hotel hotel { get; set; } public virtual icollection<reservation> reservations { get; set; } } public class hotel { public hotel() { this.rooms = new hashset<room>(); } public int id { get; set; } public string name { get; set; } public virtual icollection<room> rooms { get; set; } } public class reservation { public int id { get; set; } public datetime startdate { get; set; } public datetime enddate { get; set; } public string contactname { get; set; } public int roomid { get; set; } public virtual room room { get; set; }