public ServiceResult<CommonUserType> Retrieve(int Id) { try { IMediator service = _container.GetInstance<IMediator>(); var query = new CommonUserTypeRetrieveQuery{ Id = Id }; 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> Retrieve(int Id) { try { IMediator service = _container.GetInstance <IMediator>(); var query = new CommonUserTypeRetrieveQuery { Id = Id }; 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)); } }