| | |
| | | /// <param name="request"></param> |
| | | /// <param name="cancellationToken"></param> |
| | | /// <returns></returns> |
| | | public Task<Guid> Handle(EditEnterpriseEmployeeCommand request, CancellationToken cancellationToken) |
| | | public async Task<Guid> Handle(EditEnterpriseEmployeeCommand request, CancellationToken cancellationToken) |
| | | { |
| | | var logier = JwtUtils.GetCurrentLogier(); |
| | | return request.SaveData<EnterpriseEmployee, EditEnterpriseEmployeeCommand>( |
| | | var entity = await request.SaveData<EnterpriseEmployee, EditEnterpriseEmployeeCommand>( |
| | | q => q.Where(it => it.EnterpriseId == logier.EnterpriseId), |
| | | it => it.EnterpriseId == logier.EnterpriseId && it.Id != request.Id && it.Identity == request.Identity, |
| | | (entity) => |
| | |
| | | request.Adapt(entity); |
| | | }, |
| | | cancellationToken); |
| | | return entity.Id; |
| | | } |
| | | } |
| | | } |