예제 #1
0
        public async Task UpdateTenderReport(Guid templateReportId, Entities.TenderReport tenderReport)
        {
            var tenderReportFromDB = await _context.TenderReport.FirstOrDefaultAsync(c => c.TenderReportId == templateReportId);

            tenderReport.TenderReportId = tenderReportFromDB.TenderReportId;
            _context.Entry(tenderReportFromDB).CurrentValues.SetValues(tenderReport);
            _context.Entry(tenderReportFromDB).Property(x => x.CreatedDate).IsModified = false;
            _context.Entry(tenderReportFromDB).Property(x => x.CreatedBy).IsModified   = false;
            await _context.SaveChangesAsync();
        }
예제 #2
0
 public async Task CreateTenderReport(Entities.TenderReport tenderReport)
 {
     _context.TenderReport.Add(tenderReport);
     await _context.SaveChangesAsync();
 }