public ServiceResult<SampleTable> Edit(SampleTable obj) { try { IMediator service = _container.GetInstance<IMediator>(); IUserContext currentUser = _container.GetInstance<IUserContext>(); var query = new SampleTableEditQuery(); obj.UpdatedDate = DateTime.Now; obj.UpdatedUserId = currentUser.CurrentUserIdentity.UserID; obj.UpdatedIpAddress = currentUser.CurrentUserIdentity.IpAddress; query.SampleTable = obj; return new ServiceResult<SampleTable>(service.Proccess(query), message: ClientErrorMessage.Success(), state: ServiceResultStates.SUCCESS); } catch(ExceptionLog ex) { LoggerService.Logger.Log(_container, ex); return new ServiceResult<SampleTable>(result: null, message: ClientErrorMessage.Error(), state: ServiceResultStates.ERROR); } }
public ServiceResult<SampleTable> Edit(SampleTable obj) { SampleTableService service = new SampleTableService(_container); return service.Edit(obj); }