public async Task <ApiRequestResult> AddAsync(MemberReportDto dto) { var command = dto.EntityMap <MemberReportDto, MemberReport>(); await _memberReportRepository.AddAsync(command); return(ApiRequestResult.Success("添加成功")); }
public async Task <ApiRequestResult> UpdateAsync(MemberReportDto dto) { var entity = await _memberReportRepository.GetAsync(dto.Id.Value); var newEntity = dto.EntityMap(entity); await _memberReportRepository.UpdateAsync(newEntity); return(ApiRequestResult.Success("修改成功")); }