public bool DeleteById(int gameId) { using (var db = new NesCollectorDBContext()) { var gameToDelete = GetById(gameId); db.Remove(gameToDelete); db.SaveChanges(); if (GetById(gameId) == null) { return(true); } return(false); } }
public bool DeleteById(string userId) { using (var db = new NesCollectorDBContext()) { var userToDelete = GetById(userId); db.Remove(userToDelete); db.SaveChanges(); if (GetById(userId) == null) { return(true); } return(false); } }