title: How does EF Core Modified Entity State behave?
body: <p>Does it matter we put the entity state = modified after changes or before making changes?</p>
  
  <pre><code>using (var db = new LakshyaContext())
  {
      foreach (var category in db.Categories)
      {
          db.Entry(category).State = EntityState.Modified; // before
          category.Count = 25; //Making Changes
          db.Entry(category).State = EntityState.Modified; //After
      }
  
      db.SaveChanges();
  }
  </code></pre>