Static members = error CS0119: 'EntityCommandExecutionException' is a type, which is not valid in the given context
<p>The code below gave the above error at point where it try to enter the <code>foreach</code>. I have checked the database table and also did a select using the parameters that was passed when I stepped through the code and it returned something.</p>

<pre><code>var propertyItems = from x in _context.Db.tbl_BranchProperty
                    where x.BranchId == BranchId &amp;&amp; x.ClientId == clientId
                    select x;

foreach (var propertyItem in propertyItems)
{
</code></pre>