public static ReconNoteDto MapReconNoteToDto(ReconNote reconNote) { return(new ReconNoteDto() { Text = reconNote.Text }); }
public async Task Add(ReconNote reconNote) { reconNote.DateOfCreation = DateTime.Now; await _massReconContext.ReconNote.AddAsync(reconNote); await _massReconContext.SaveChangesAsync(); }
public async Task Update(ReconNote reconNote) { var reconNoteToUpdate = await _massReconContext.ReconNote .SingleOrDefaultAsync(x => x.Id == reconNote.Id); if (reconNote != null) { reconNoteToUpdate.DateOfUpdate = DateTime.Now; reconNoteToUpdate.Text = reconNote.Text; await _massReconContext.SaveChangesAsync(); } }