public Season Update(Season season) { var seas = _context.Seasons.FirstOrDefault(cp => cp.Id == season.Id); if (seas == null) throw new ArgumentException(); _context.Entry(season).State = System.Data.Entity.EntityState.Modified; _context.SaveChanges(); return seas; }
public Season Delete(Season season) { var seas = _context.Seasons.Remove(season); _context.SaveChanges(); return seas; }
public Season Create(Season season) { var seas = _context.Seasons.Add(season); _context.SaveChanges(); return seas; }