title: How to update models in asp.net through database first approach while keeping some previous methods alive
body: <p>I have the following columns in the <code>Patients</code> table:</p>
  <p><img src="https://i.stack.imgur.com/wVXD5.png" alt="Screenshot of Patients table" /></p>
  <p>I've created models using the following command.</p>
  <pre><code>Scaffold-DbContext &quot;Server=.;Database=Tasks3;Trusted_Connection=True;&quot; 
           Microsoft.EntityFrameworkCore.SqlServer 
           -OutputDir Models\MainModel
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Id6jG.png" rel="nofollow noreferrer">Screenshot of Patient Model</a></p>
  <p>I've some methods in context class to make my connection string dynamic. Actually I used to fetch data from tokens and after some logic connection string changes from client to client.</p>
  <p>Now the problem is here, when I make changes in patients table (for instance, I changed CNIC column from <code>CNIC5</code> to <code>CNIC</code>) and run the following command with <code>-Force</code> keyword, it delete all the data from the previous <code>Tasks3Context</code> class (<code>DbContext</code>).</p>
  <pre><code>Scaffold-DbContext &quot;Server=.;Database=Tasks3;Trusted_Connection=True;&quot; 
           Microsoft.EntityFrameworkCore.SqlServer 
           -OutputDir Models\MainModel -t &lt;Patient&gt; -f
  </code></pre>
  <p>Tell me some method that update models and make changes in only specific model and column.</p>
  <p>Thanks in advance!</p>