public void Delete(int id) //Upadate single records { tbl_Hotels Hotels = db.tbl_Hotels.Find(id); db.tbl_Hotels.Remove(Hotels); save(); }
public int Upadate2(tbl_Hotels obj) //Upadate single records { db.Entry(obj).State = System.Data.Entity.EntityState.Modified; save(); return(obj.ID); }
public int Update_hotel2(HotelsCustomModel model) { tbl_Hotels Hotel = model.Hotels; int id = Hotels_obj.Upadate2(Hotel); return(id); }
// HotelsCustomModel METHODS public int Insert_hotel(HotelsCustomModel model) { tbl_Hotels Hotel = model.Hotels; int id = Hotels_obj.Insert(Hotel); return(id); }
public int Insert(tbl_Hotels obj) //Insert single records { db.tbl_Hotels.Add(obj); save(); int Id = obj.ID; return(Id); }
public void Upadate(tbl_Hotels obj) //Upadate single records { db.Entry(obj).State = System.Data.Entity.EntityState.Modified; save(); }
public tbl_Hotels GetById(int id) //get single records { tbl_Hotels Hotels = db.tbl_Hotels.Find(id); return(Hotels); }
public void Update_hotel(HotelsCustomModel model) { tbl_Hotels Hotel = model.Hotels; Hotels_obj.Upadate(Hotel); }