/// <summary> /// 异步获取域名 /// </summary> public async Task <DomainDto> GetDomainByIdAsync(Guid id) { var entity = await DomainRepository.FindAsync(id); var result = entity.ToDto(); return(result); }
/// <summary> /// 修改域名 /// </summary> public async Task UpdateAsync(DomainUpdateRequest request) { var entity = await DomainRepository.FindAsync(request.DomainId); request.MapTo(entity); await DomainRepository.UpdateAsync(entity); await UnitOfWork.CommitAsync(); }