<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LINQ to SQL Tips 9: Understanding DataContext's internal caching </title><link>http://blogs.msdn.com/dinesh.kulkarni/archive/2008/07/01/linq-to-sql-tips-9-understanding-datacontext-s-internal-caching.aspx</link><description>Back to the "tips" series after a little break ... One common question I get is about caching of data in LINQ to SQL. It means a lot of different things so let's start with the following baseline: LINQ to SQL was designed to get you objects from the database</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: LINQ to SQL Tips 9: Understanding DataContext's internal caching </title><link>http://blogs.msdn.com/dinesh.kulkarni/archive/2008/07/01/linq-to-sql-tips-9-understanding-datacontext-s-internal-caching.aspx#8764936</link><pubDate>Wed, 23 Jul 2008 00:22:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8764936</guid><dc:creator>logicalmind</dc:creator><description>&lt;p&gt;If I switch ObjectTrackingEnabled to false, does the DataContext not track the returned object anymore?&lt;/p&gt;
&lt;p&gt;What happens if I create my data objects as POCO's with Table/Column attributes and they are not derived from EntityRef and don't use EntitySets?&lt;/p&gt;
&lt;p&gt;Basically I want to use linq to sql for queries (read-only). I don't want linq to cache anything.&lt;/p&gt;
</description></item><item><title>re: LINQ to SQL Tips 9: Understanding DataContext's internal caching </title><link>http://blogs.msdn.com/dinesh.kulkarni/archive/2008/07/01/linq-to-sql-tips-9-understanding-datacontext-s-internal-caching.aspx#8782671</link><pubDate>Mon, 28 Jul 2008 08:48:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8782671</guid><dc:creator>Dinesh.Kulkarni</dc:creator><description>&lt;p&gt;&amp;gt; If I switch ObjectTrackingEnabled to false, does the DataContext not track the returned object anymore?&lt;/p&gt;
&lt;p&gt;With that setting, your objects won't be tracked. It improves perf a bit further for queries.&lt;/p&gt;
&lt;p&gt;You can absolutely use POCOs. You won't get the bidirectional relationship management provided by EntitySet/EntityRef. But you can use POCOs for queries (and updates as well if you want).&lt;/p&gt;
</description></item></channel></rss>