public static TraceabilityEntity Map(this TraceabilityDto entity) { return(new TraceabilityEntity() { CreationDate = entity.CreationDate, Document = entity.Document, TraceabilityId = entity.TraceabilityId, }); }
public async Task <TraceabilityDto> AddAsync(TraceabilityDto traceabilityDto) { await _traceabilityRepository.AddAsync(traceabilityDto.Map()); return(traceabilityDto); }