//Get the details of a particular Game public TblGameDes GetGameData(int id) { try { TblGameDes game = db.TblGameDes.Find(id); return(game); } catch { throw; } }
//To Update the records of a particluar Game public int UpdateGame(TblGameDes game) { try { db.Entry(game).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }
//To Add new Game Record public int AddGame(TblGameDes game) { try { db.TblGameDes.Add(game); db.SaveChanges(); return(1); } catch { throw; } }
//To Delete the record of a particulargame public int DeleteGame(int id) { try { TblGameDes game = db.TblGameDes.Find(id); db.TblGameDes.Remove(game); db.SaveChanges(); return(1); } catch { throw; } }