public Footballers UpdatePlayers(Footballers footballers) { using (var fteamDb = new FteamDbContext()) { fteamDb.players.Update(footballers); fteamDb.SaveChanges(); return(footballers); } }
public void DeletePlayers(int id) { using (var fteamDb = new FteamDbContext()) { var deletedPlayer = GetPlayerById(id); fteamDb.players.Remove(deletedPlayer); fteamDb.SaveChanges(); } }