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