protected virtual async Task Create(CreateOrEditLichSuUploadDto input) { var lichSuUpload = ObjectMapper.Map <LichSuUpload>(input); await _lichSuUploadRepository.InsertAsync(lichSuUpload); }
public async Task CreateOrEdit(CreateOrEditLichSuUploadDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditLichSuUploadDto input) { var lichSuUpload = await _lichSuUploadRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, lichSuUpload); }