title: Returning single object and string from web api controller method
body: <p>I am in a situation where i need to return the single object along with string .. I am very new to web api and just could not be able to figure it out how to return multiple parameters ..</p>
  
  <p>below is the code what i have tried so far ..</p>
  
  <pre><code>    public async Task&lt;IHttpActionResult&gt; PostAuthenticationData(long id, string password)
      {
          Consumer consumer = await db.Consumers.FindAsync(id);
  
          if (consumer == null)
          {
              return NotFound();
          }
  
          if(consumer.ConsumerPassword != password)
          {
              return BadRequest();
          }
  
          ConsumerSessionTokenLog consumerSessionTokenLog = await db.ConsumerSessionTokenLogs.FindAsync(id);
  
          if(consumerSessionTokenLog == null)
          {
              return NotFound(); 
          }
          else
          {
              string sessionToken = consumerSessionTokenLog.SessionToken;
          }
  
    /// here i need to return "sessionToken" and "consumer" object 
          return Ok(consumer);
      }
  </code></pre>
  
  <p>Could any one please help on this query..</p>
  
  <p>Many thanks in advance</p>