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);
 		}
 	}
Exemplo n.º 2
0
 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));
     }
 }