public void HotelTypeInfoDelete(int HotelTypeId) { Htl_HotelTypeInfos result = ent.Htl_HotelTypeInfos.Where(x => x.HotelTypeId == HotelTypeId).FirstOrDefault(); ent.DeleteObject(result); ent.SaveChanges(); }
// public void HotelTypeInfoEdit(HotelTypeInfos model) { Htl_HotelTypeInfos result = ent.Htl_HotelTypeInfos.Where(x => x.HotelTypeId == model.HotelTypeId).FirstOrDefault(); result.HotelTypeId = model.HotelTypeId; result.HotelTypeName = model.HotelTypeName; result.Description = model.Description; result.isActive = model.isActive; result.UpdatedBy = App_Class.AppSession.LogUserID; result.UpdatedDate = DateTime.Now; ent.ApplyCurrentValues(result.EntityKey.EntitySetName, result); ent.SaveChanges(); }
// public void HotelTypeInfoAdd(HotelTypeInfos model) { Htl_HotelTypeInfos obj = new Htl_HotelTypeInfos { HotelTypeId = model.HotelTypeId, HotelTypeName = model.HotelTypeName, Description = model.Description, isActive = model.isActive, CreatedBy = App_Class.AppSession.LogUserID, CreatedDate = DateTime.Now, }; ent.AddToHtl_HotelTypeInfos(obj); ent.SaveChanges(); }