title: ASP NET MVC 5 Task Async Create an Async Method
body: <p>So I just want to make my service layer <code>async</code>.</p>
  
  <p>I have a new service <code>ProjectManagement</code> and I want its <code>GetProjects</code> method to be asynchronous.</p>
  
  <pre><code>public Task&lt;string&gt; GetProjectsAsync()
  {
      var json = JsonConvert.SerializeObject(_repository.All&lt;Projects&gt;());
  
      return json;
  }
  </code></pre>
  
  <p>I know this method doesn't work, obviously  because I'm return a string, not a <code>Task&lt;string&gt;</code>. So how do I use the <code>Task.Run()</code> to run this method and return the result?</p>
  
  <p>I've looked at this <a href="http://msdn.microsoft.com/en-gb/library/hh195051.aspx" rel="nofollow">documentation</a> and I'm a bit confused on how to use it?</p>
  
  <p>All I want to be able to do in my controller is:</p>
  
  <pre><code>var jsonData = await _projectManagement.GetProjectsAsync();
  </code></pre>