//Delete public int DeleteStadium(int StadiumID) { Stadiums stadium = ctx.Stadiums.Where(u => u.StadiumId == StadiumID).FirstOrDefault(); ctx.Stadiums.Remove(stadium); return(ctx.SaveChanges()); }
//Update public Stadiums UpdateStadium(string s_name, int capacity, string address, int StadiumID) { Stadiums stadium = ctx.Stadiums.Single(u => u.StadiumId == StadiumID); stadium.SName = s_name; stadium.Capacity = capacity; stadium.Address = address; ctx.SaveChanges(); return(ctx.Stadiums.Single(u => u.StadiumId == StadiumID)); }