public void Delete(HttpResponse response, HttpSession session, DeleteGameBm bind) { User admin = this.GetAuthenticatedAdmin(response, session.Id); if (admin == null) { return; } this.service.DeleteGame(bind); this.Redirect(response, "/admin/all"); }
public void DeleteGame(DeleteGameBm bind) { this.Context.Games.Remove(bind.Id); this.Context.SaveChanges(); }