public void HotelFacilityDelete(int FacilityId) { Htl_HotelFacilities result = ent.Htl_HotelFacilities.Where(x => x.FacilityId == FacilityId).FirstOrDefault(); ent.DeleteObject(result); ent.SaveChanges(); }
public void HotelFacilityEdit(HotelFacilities model) { Htl_HotelFacilities result = ent.Htl_HotelFacilities.Where(x => x.FacilityId == model.FacilityId).FirstOrDefault(); result.FacilityId = model.FacilityId; result.FacilityName = model.FacilityName; result.Details = model.Details; result.isActive = model.isActive; result.UpdatedBy = App_Class.AppSession.LogUserID; result.UpdatedDate = DateTime.Now; ent.ApplyCurrentValues(result.EntityKey.EntitySetName, result); ent.SaveChanges(); }
public void HotelFacilityAdd(HotelFacilities model) { Htl_HotelFacilities obj = new Htl_HotelFacilities { FacilityName = model.FacilityName, Details = model.Details, isActive = model.isActive, CreatedBy = App_Class.AppSession.LogUserID, CreatedDate = DateTime.Now, }; ent.AddToHtl_HotelFacilities(obj); ent.SaveChanges(); }