Company class:
class Company {
public virtual int Id { get;set;}
public virtual string Name { get;set;}
public virtual int IntProp { get;set;}
}
Companies table:
CREATE TABLE Companies (
Id INT PRIMARY KEY,
Name NVARCHAR(50) NOT NULL,
IntProp INT NULL );
Here is my web.config:
<syscache2>
<cacheRegion name="RefData"></cacheRegion>
<cacheRegion name="Company">
<dependencies>
<commands>
<add name="CompanyCommand"
command="SELECT * FROM Companies WHERE Deleted = 0"
/>
</commands>
</dependencies>
</cacheRegion>
</syscache2>
Problem: other entities in the RefData cache region (which never change, think countries, etc.) are cached fine. Company, on the other hand, is not.