public static Exception DeleteHotel(List <Hotel> hotels) { TourBaseEntities.GetContext().Hotels.RemoveRange(hotels); try { GetContext().SaveChanges(); return(null); } catch (Exception ex) { return(ex); } }
public FirstPage() { InitializeComponent(); DGridHotels.ItemsSource = TourBaseEntities.GetContext().Hotels.ToList(); }