Example #1
0
 public ServiceResult<Company> Edit(Company obj)
 {
     try
     {
         IMediator service = _container.GetInstance<IMediator>();
         var query = new CompanyEditQuery();
         query.Company = obj;
         return new ServiceResult<Company>(service.Proccess(query), message: ClientErrorMessage.Success(), state: ServiceResultStates.SUCCESS);
     }
     catch (ExceptionLog ex)
     {
         LoggerService.Logger.Log(_container, ex);
         return new ServiceResult<Company>(result: null, message: ClientErrorMessage.Error(), state: ServiceResultStates.ERROR);
     }
 }
Example #2
0
 public ServiceResult<Company> Edit(Company obj)
 {
     CompanyService service = new CompanyService(_container);
     return service.Edit(obj);
 }