title: Cannot find a type code for an implementation class for grain interface
body: <p>In microsoft orleans <strong>( v0.9 Preview April 2014)</strong>, you may get this error when creating an azure web-api which references orleans grains:</p>
  
  <blockquote>
    <p>Cannot find a type code for an implementation class for grain interface: 729000394.<br>
       Make sure the grain assembly was correctly deployed and loaded in the silo.</p>
  </blockquote>
  
  <p>Here is some sample api code that may generate this error:</p>
  
  <pre><code>public class GrainController: ApiController
  {
  
      public GrainControllerController() { 
  
      }
  
  
      public async Task&lt;List&lt;Model&gt;&gt; Get() {
          var grain = MyGrainFactory.GetGrain(0);
          return await grain.GetModels();
      }
  }
  </code></pre>
  
  <p>Here's some grain code:</p>
  
  <pre><code>public class MyGrain: Orleans.GrainBase, IMyGrain
  {
      public Task&lt;List&lt;Model&gt;&gt; GetModels()
      {
          return Task.FromResult(new List&lt;Model&gt;() { 
  
              new Model(){
                   name="my model name"
              }
          });
      }
  }
  
  public interface IMyGrain : Orleans.IGrain
  {
      Task&lt;List&lt;Model&gt;&gt; GetModel();
  }
  </code></pre>