public IUserRoleMvoStateEvent GetStateEvent(string id, long version) { try { var idObj = UserRoleMvosControllerUtils.ParseIdString(id); return(_userRoleMvoApplicationService.GetStateEvent(idObj, version)); } catch (Exception ex) { var response = UserRoleMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public UserRoleMvoStateDto Get(string id, string fields = null) { try { var idObj = UserRoleMvosControllerUtils.ParseIdString(id); var state = (UserRoleMvoState)_userRoleMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new UserRoleMvoStateDto(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = UserRoleMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }