title: how can i delete all records acc. to ViewID in mvc
body: <pre><code>Id          ViewId                        ColumnName
  1   4C3A2B7A-A901-4906-BFAB-514D94395140    A
  2   4C3A2B7A-A901-4906-BFAB-514D94395140    B
  3   4C3A2B7A-A901-4906-BFAB-514D94395140    C
  4   4C3A2B7A-A901-4906-BFAB-514D94395140    D
  5   4C3A2B7A-A901-4906-BFAB-514D94395140    E
  </code></pre>
  
  <p>please tell me how can I delete all records acc. to <code>ViewID</code> in mvc5. I am using this code : </p>
  
  <pre><code>db.ViewXColumnIndexes.RemoveRange(db.ViewXColumnIndexes.Where(x =&gt; x.ViewId == viewId)); 
  db.SaveChanges();   
  </code></pre>
  
  <p>but it's not working..please tell me asap.</p>