Browse Source

fix #1090 Use the Repository Update method in the Update method of CrudAppService.

pull/1093/head
maliming 8 years ago
parent
commit
189b97c6dc
  1. 1
      framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs
  2. 1
      framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs

1
framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AsyncCrudAppService.cs

@ -106,6 +106,7 @@ namespace Volo.Abp.Application.Services
//TODO: Check if input has id different than given id and normalize if it's default value, throw ex otherwise
MapToEntity(input, entity);
await Repository.UpdateAsync(entity);
await CurrentUnitOfWork.SaveChangesAsync();
return MapToEntityDto(entity);

1
framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs

@ -100,6 +100,7 @@ namespace Volo.Abp.Application.Services
var entity = GetEntityById(id);
MapToEntity(input, entity);
Repository.Update(entity);
CurrentUnitOfWork.SaveChanges();
return MapToEntityDto(entity);

Loading…
Cancel
Save