public bool Delete(int id) { try { _dbContext.Entry(new Product { Id = id }).State = EntityState.Deleted; _dbContext.SaveChanges(); } catch (Exception) { return(false); } return(true); }
public bool Delete(int id) { try { _businessLogicDbContext.Entry(new User { Id = id }).State = EntityState.Deleted; _businessLogicDbContext.SaveChanges(); } catch (Exception) { return(false); } return(true); }