title: passing xml data into a string to be used as a parameter
body: <p>Having trouble dealing with xml and to properly use it for my purpose. So i am creating a test method and one of the parameters is xml data and i am not sure how to pass it in. </p>
  
  <p><strong>Service</strong></p>
  
  <pre><code>public IEnumerable&lt;Submissions&gt; CheckingOutForUserReview(string data)
          {
              var _submissions = DataContextManager.StoredProcs.CheckingOutForUserReview&lt;SSubmissions&gt;(data, s =&gt; new Submissions
              {
                 QRCodeGUID = SubmissionsColumnMap.QRCodeGUID(s),
                 StoragePath = SubmissionsColumnMap.StoragePath(s),
                 UploadedByUsersID = SubmissionsColumnMap.UploadedByUsersID(s)
              });
  
              return _submissions;
          }
  </code></pre>
  
  <p><strong>Stored Proc:</strong></p>
  
  <pre><code>public virtual IEnumerable&lt;T&gt; CheckingOutForUserReview&lt;T&gt;(string data, Func&lt;IDataRecord, T&gt; modelBinder)
          {
              SqlCommand _command = new SqlCommand("dbo.CheckingOutForUserReview");
              _command.CommandType = CommandType.StoredProcedure;
              _command.Parameters.Add(new SqlParameter { ParameterName = "Data", SqlDbType = SqlDbType.Xml, Value = data });
              return DbInstance.ExecuteAs&lt;T&gt;(_command, modelBinder);
          }
  </code></pre>
  
  <p>This is my TestMethod: </p>
  
  <pre><code>    public void CheckingOutForUserReview()
              {
  string _data = @"&lt;CheckingOutForUserReview xmlns:i=""www.w3.org/2001/XMLSchema-instance"" xmlns=""schemas.name.com/2013/03/Malt.Models""&gt;
                                  &lt;Record&gt;
                                  &lt;QRCodeID&gt;2FAC636E-F96C-4465-9272-760BAF73C0DF&lt;/QRCodeID&gt;
                                  &lt;SubmissionID&gt;10B5236C-47FD-468D-B88D-D789CA0C663A&lt;/SubmissionID&gt;
                                  &lt;UserID&gt;1&lt;/UserID&gt;
                                  &lt;Page&gt;1&lt;/Page&gt;
                                  &lt;/Record&gt;
                              &lt;/CheckingOutForUserReview&gt;";
              XmlDocument doc = new XmlDocument();
              doc.LoadXml(_data);
              var _Svc = new SubmissionsService();
              var _checkins = _Svc.CheckingOutForUserReview(doc.InnerXml);
          }
  </code></pre>
  
  <p><strong>UPDATE:</strong>
  my CheckingOutForUserReview() method accepts a XmlDocument as i changed it to that in my stored procedure and with what i currently have it is giving an error that i have invalid arguments(System.Xml.XmlDocument) not sure if i messed up somewhere. </p>
  
  <p>If this is a different way i am also open in trying new ways. Thanks for the help. </p>