Error in DbContext after adding a column to table (ASP.NET/EF Core)
<p>All was working fine until I added a new column to my table. I could not find how to update the model class, so I added the column myself in model. But now, when I run my application, I get error: "Object reference not set to an instance of an object."</p>

<p>During debug, I found that it is the problem with creation of instance of my dbcontext:</p>

<pre><code>MyDbContext context = new MyDbContext(db);
</code></pre>

<p>The context object is Not fetching rows from table and is giving this Object reference error.</p>

<p>If I remove the new column from Model class then it works fine. That suggests that my database and model is Not in sync and it seems that the application is using old table design.</p>

<p>I am also trying to use CLI commands to update database but facing difficulties in that as well.</p>

<p>Can anyone suggest how to make model class and table design in sync once a table column is added? I am using ASP.NET Core and EF Core.</p>

<p>Thank you.</p>