private void detach_Facilities(Facility entity)
		{
			this.SendPropertyChanging();
			entity.Hotel = null;
		}
		private void attach_Facilities(Facility entity)
		{
			this.SendPropertyChanging();
			entity.Hotel = this;
		}
 partial void DeleteFacility(Facility instance);
 partial void UpdateFacility(Facility instance);
 partial void InsertFacility(Facility instance);
Ejemplo n.º 6
0
 public ActionResult AddFacility(FacilityModel fmodel)
 {
     try
     {
         HolidayPlanner.DAL.Facility ft = new HolidayPlanner.DAL.Facility()
         {
             FacilityId = fmodel.FacilityId,
             FacilitiesType = fmodel.FacilitiesType,
             HotelId = fmodel.HotelId
         };
         context.Facilities.InsertOnSubmit(ft);
         context.SubmitChanges();
         return RedirectToAction("Index");
     }
     catch
     {
         return View(fmodel);
     }
 }