//Get the details of a particular team public TblTeams GetTeamData(int id) { try { TblTeams team = db.TblTeams.Find(id); return(team); } catch { throw; } }
//To Update the records of a particluar team public int UpdateTeam(TblTeams team) { try { db.Entry(team).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }
//To Add new team record public int AddTeam(TblTeams team) { try { db.TblTeams.Add(team); db.SaveChanges(); return(1); } catch { throw; } }
//To Delete the record of a particular team public int DeleteTeam(int id) { try { TblTeams emp = db.TblTeams.Find(id); db.TblTeams.Remove(emp); db.SaveChanges(); return(1); } catch { throw; } }