示例#1
0
 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); }
 }
示例#2
0
 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); }
 }