Why can't I have property of type Type in my model for Entity Framework?
<p>I'm setting up a model for a project and everything works as expected, except for the change below. I thought it'd be neat to specify the type as <code>Type</code> instead of its description as <code>string</code>.</p>

<pre><code>namespace DataBase.Entities
{
  public class Lock
  {
    public Guid Id { get; set; }
    public DateTime? Occasion { get; set; }
    public int Counter { get; set; }
    public Type Entity { get; set; }
    //public string Entity { get; set; }
  }
}
</code></pre>

<p>Guess what! EF didn't like it one bit. The error I get when adding an explicit migration then is as follows and I have no idea why.</p>

<blockquote>
  <p>System.ArgumentNullException: Value cannot be null.<br>
  Parameter name: entitySet</p>
</blockquote>

<p>Most of the goolearching resulted in <a href="https://stackoverflow.com/q/22680342/1525840">people</a> discovering that the POCO classes had some inheritance they forgot about. <a href="https://stackoverflow.com/a/32215507/1525840">Someone</a> suggested to force re-enabled migrations. I don't have any inheritance at all in the model and forcing the migrations gave nothing but a recreated configuration file.</p>