//[6][1] 입력 public async Task <BriefingLog> AddAsync(BriefingLog model) { try { _context.BriefingLogs.Add(model); await _context.SaveChangesAsync(); } catch (Exception e) { _logger.LogError($"ERROR({nameof(AddAsync)}): {e.Message}"); } return(model); }
//[6][4] 수정 public async Task <bool> EditAsync(BriefingLog model) { try { _context.BriefingLogs.Attach(model); _context.Entry(model).State = EntityState.Modified; return(await _context.SaveChangesAsync() > 0 ? true : false); } catch (Exception e) { _logger.LogError($"ERROR({nameof(EditAsync)}): {e.Message}"); } return(false); }