public async Task DeleteExpenditure(string ExpenditureCode) { var ExpenditureFromDB = await _context.ExpenditureType.FirstOrDefaultAsync(c => c.Code.Equals(ExpenditureCode)); _context.Entry(ExpenditureFromDB).State = EntityState.Deleted; await _context.SaveChangesAsync(); }
public async Task DeleteTender(string tenderCode) { var tenderFromDB = await _context.TenderType.FirstOrDefaultAsync(c => c.Code.Equals(tenderCode)); _context.Entry(tenderFromDB).State = EntityState.Deleted; await _context.SaveChangesAsync(); }
public async Task DeleteTenderReport(Guid templateReportId) { var tenderReportFromDB = await _context.TenderReport.FirstOrDefaultAsync(c => c.TenderReportId == templateReportId); _context.Entry(tenderReportFromDB).State = EntityState.Deleted; await _context.SaveChangesAsync(); }