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);
 		}
 	}
예제 #2
0
 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));
     }
 }