|
|
@ -57,19 +57,14 @@ namespace Shentun.Peis.MaritalStatuses |
|
|
public async Task<MaritalStatusDto> UpdateAsync(char Id, UpdateMaritalStatusDto input) |
|
|
public async Task<MaritalStatusDto> UpdateAsync(char Id, UpdateMaritalStatusDto input) |
|
|
{ |
|
|
{ |
|
|
var ent = await _repository.GetAsync(m => m.Id == Id); |
|
|
var ent = await _repository.GetAsync(m => m.Id == Id); |
|
|
if (ent != null) |
|
|
|
|
|
{ |
|
|
|
|
|
ent.SimpleCode = input.SimpleCode; |
|
|
|
|
|
ent.DisplayName = input.DisplayName; |
|
|
|
|
|
|
|
|
|
|
|
var newent = await _repository.UpdateAsync(ent); |
|
|
|
|
|
|
|
|
ent.SimpleCode = input.SimpleCode; |
|
|
|
|
|
ent.DisplayName = input.DisplayName; |
|
|
|
|
|
|
|
|
|
|
|
var newent = await _repository.UpdateAsync(ent); |
|
|
|
|
|
|
|
|
|
|
|
return ObjectMapper.Map<MaritalStatus, MaritalStatusDto>(newent); |
|
|
|
|
|
|
|
|
return ObjectMapper.Map<MaritalStatus, MaritalStatusDto>(newent); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
return ObjectMapper.Map<MaritalStatus, MaritalStatusDto>(ent); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|