public IUserLoginMvoStateEvent GetStateEvent(string id, long version) { try { var idObj = UserLoginMvosControllerUtils.ParseIdString(id); return(_userLoginMvoApplicationService.GetStateEvent(idObj, version)); } catch (Exception ex) { var response = UserLoginMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public UserLoginMvoStateDto Get(string id, string fields = null) { try { var idObj = UserLoginMvosControllerUtils.ParseIdString(id); var state = (UserLoginMvoState)_userLoginMvoApplicationService.Get(idObj); if (state == null) { return(null); } var stateDto = new UserLoginMvoStateDto(state); if (String.IsNullOrWhiteSpace(fields)) { stateDto.AllFieldsReturned = true; } else { stateDto.ReturnedFieldsString = fields; } return(stateDto); } catch (Exception ex) { var response = UserLoginMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }