public ServiceResult<CommonUserType> Edit(CommonUserType obj) { try { IMediator service = _container.GetInstance<IMediator>(); IUserContext currentUser = _container.GetInstance<IUserContext>(); var query = new CommonUserTypeEditQuery(); query.CommonUserType = obj; return new ServiceResult<CommonUserType>(service.Proccess(query), message: ClientErrorMessage.Success(), state: ServiceResultStates.SUCCESS); } catch(ExceptionLog ex) { LoggerService.Logger.Log(_container, ex); return new ServiceResult<CommonUserType>(result: null, message: ClientErrorMessage.Error(), state: ServiceResultStates.ERROR); } }
public ServiceResult<CommonUserType> Edit(CommonUserType obj) { CommonUserTypeService service = new CommonUserTypeService(_container); return service.Edit(obj); }