コード例 #1
0
 public static Exception DeleteHotel(List <Hotel> hotels)
 {
     TourBaseEntities.GetContext().Hotels.RemoveRange(hotels);
     try
     {
         GetContext().SaveChanges();
         return(null);
     }
     catch (Exception ex)
     {
         return(ex);
     }
 }
コード例 #2
0
 public FirstPage()
 {
     InitializeComponent();
     DGridHotels.ItemsSource = TourBaseEntities.GetContext().Hotels.ToList();
 }