public void Remove(Guid id) { var t = Find(id); _context.Remove <T>(t); _context.SaveChanges(); }
public bool Remove(Guid id) { var beneficiary = Find(id); if (beneficiary != null) { _db.Remove(beneficiary); _db.SaveChanges(); return(true); } return(false); }
public bool Remove(Guid id) { var address = Find(id); if (address != null) { _db.Remove(address); _db.SaveChanges(); return(true); } return(false); }
public bool Remove(Guid id) { var telephones = Find(id); if (telephones != null) { _db.Remove(telephones); _db.SaveChanges(); return(true); } return(false); }
public bool Remove(Guid id) { var contract = Find(id); if (contract != null) { _db.Remove(contract); _db.SaveChanges(); return(true); } return(false); }
public bool Remove(Guid id) { var individual = Find(id); if (individual != null) { _db.Remove(individual); _db.SaveChanges(); return(true); } return(false); }
public async Task <bool> DeletePlotByPubKeyAsync(string publicKey) { var plotInfo = await DbContext.Plots.FirstOrDefaultAsync(x => x.PublicKey == publicKey); if (plotInfo == null) { return(false); } try { await HarvesterClient.DeletePlotAsync(plotInfo.FileName); DbContext.Remove(plotInfo); await DbContext.SaveChangesAsync(); return(true); } catch { return(false); } }