public ServiceResult <string> Delete(int Id) { try { IMediator service = _container.GetInstance <IMediator>(); var query = new CommonUserTypeDeleteQuery { Id = Id }; return(new ServiceResult <string>(service.Proccess(query).ToString(), message: ClientErrorMessage.Success(), state: ServiceResultStates.SUCCESS)); } catch (ExceptionLog ex) { LoggerService.Logger.Log(_container, ex); return(new ServiceResult <string>(result: null, message: ClientErrorMessage.Error(), state: ServiceResultStates.ERROR)); } }
public ServiceResult<string> Delete(int Id) { try { IMediator service = _container.GetInstance<IMediator>(); var query = new CommonUserTypeDeleteQuery{ Id = Id }; return new ServiceResult<string>(service.Proccess(query).ToString(), message: ClientErrorMessage.Success(), state: ServiceResultStates.SUCCESS); } catch(ExceptionLog ex) { LoggerService.Logger.Log(_container, ex); return new ServiceResult<string>(result: null, message: ClientErrorMessage.Error(), state: ServiceResultStates.ERROR); } }