<?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>Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx</link><description>I often get asked how LINQ to SQL is supposed to be used with Test Driven Design (TDD). Okay, not really. People aren’t knocking on my door or calling me at 3:00 am. I do, however, occasionally read developers angst on their personal blogs. It seems they</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8460006</link><pubDate>Mon, 05 May 2008 11:48:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8460006</guid><dc:creator>Davin</dc:creator><description>&lt;p&gt;How does this work with generated code? Or are you suggesting that you would generate the code from the dbml and then replace DataContext with this ExtensibleDataContext?&lt;/p&gt;</description></item><item><title>Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8460149</link><pubDate>Mon, 05 May 2008 13:10:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8460149</guid><dc:creator>LINQ in Action roller</dc:creator><description>&lt;p&gt;I often get asked how LINQ to SQL is supposed to be used with Test Driven Design (TDD). Okay, not really.&lt;/p&gt;
</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8460827</link><pubDate>Mon, 05 May 2008 19:23:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8460827</guid><dc:creator>Jeff LeBert</dc:creator><description>&lt;p&gt;Another solution would be to use Typemock Isolator at &lt;a rel="nofollow" target="_new" href="http://www.typemock.com"&gt;http://www.typemock.com&lt;/a&gt;. There's a free community edition you can play with.&lt;/p&gt;
&lt;p&gt;This allows you to mock almost anything including private and static methods. I've been using it for the last month on a C# application that was NOT designed to be unit tested. It's allowed me to test stuff that was impossible to test before without spinning up huge amounts of &amp;quot;state&amp;quot; just to test a simple thing.&lt;/p&gt;
&lt;p&gt;This is a great hack and well worth the read. I believe it is the basis for the other mock frameworks like Rhino Mocks and MoQ.&lt;/p&gt;</description></item><item><title>LINQ to SQL Tips 3: Deferred (lazy) loading of related objects with stored procs</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8462319</link><pubDate>Tue, 06 May 2008 09:13:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8462319</guid><dc:creator>Dinesh's Cyberstation</dc:creator><description>&lt;p&gt;This post is a confluence of two distinct sets of comments I got: The above-mentioned feature is a well-hidden&lt;/p&gt;
</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8463941</link><pubDate>Wed, 07 May 2008 00:07:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8463941</guid><dc:creator>kfarmer@microsoft.com</dc:creator><description>&lt;p&gt;Matt.. I'll say it: &amp;nbsp;You craaazy, man.&lt;/p&gt;
&lt;p&gt;By the way, what *are* the security principle requirements for this trick to work? &amp;nbsp;Should we expect it to work in a web hosting scenario?&lt;/p&gt;
</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8466013</link><pubDate>Wed, 07 May 2008 18:15:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8466013</guid><dc:creator>mattwar</dc:creator><description>&lt;p&gt;Keith, I'm using reflection to overwrite a private field. &amp;nbsp;You do the math.&lt;/p&gt;
</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8475450</link><pubDate>Fri, 09 May 2008 02:20:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8475450</guid><dc:creator>James Hancock</dc:creator><description>&lt;p&gt;Here's what I hope we get in V2 of Linq to SQL:&lt;/p&gt;
&lt;p&gt;Full interfaces&lt;/p&gt;
&lt;p&gt;Full Providers&lt;/p&gt;
&lt;p&gt;A single file for each class that we can override and the designer doesn't screw with. It messes with Attributes and makes sure the stubs are right, and leaves the contents alone after it's been first implimented.&lt;/p&gt;
&lt;p&gt;True OOP so that we can inherit classes and have the designer use them instead of the code gen crap.&lt;/p&gt;
&lt;p&gt;True incremental change management instead of the entire file being ovewritten all of the time because of the designer.&lt;/p&gt;
&lt;p&gt;Change Management at runtime for disconnected states (i.e. the object should store it's own changes and then deal with the context when it's added/updated to tell it what to update.&lt;/p&gt;
&lt;p&gt;It should know which objects are modified and which aren't when added so that you don't have to just force it to update something that really hasn't changed.&lt;/p&gt;</description></item><item><title>Mocking LINQ to SQL</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8480534</link><pubDate>Fri, 09 May 2008 18:21:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8480534</guid><dc:creator>Mike Taulty's Blog</dc:creator><description>&lt;p&gt;Matt Warren has an &amp;quot;interesting&amp;quot; post on how you could hack your way to a mocked implementation of LINQ...&lt;/p&gt;
</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8488230</link><pubDate>Sun, 11 May 2008 21:35:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8488230</guid><dc:creator>Keith J. Farmer</dc:creator><description>&lt;p&gt;@Matt: &amp;nbsp;Yeah, that's what I thought. &amp;nbsp;Just wanted to be sure about whether it was Cthulu or Leviathon you were invoking :)&lt;/p&gt;</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8531498</link><pubDate>Thu, 22 May 2008 11:44:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8531498</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;&amp;quot;LINQ to SQL was actually designed to be host to more types of back-ends than just SQL server. It had a provider model targeted for RTM, but was disabled before the release. &amp;nbsp;Don’t ask me why. &amp;nbsp;Be satisfied to know that is was not a technical reason. Internally, it still behaves that way. &amp;nbsp;The trick is to find out how to swap in a new one when everything from the language to the runtime wants to keep you from doing it.&amp;quot;&lt;/p&gt;
&lt;p&gt;That sounds scary. As a customer, I think I want to know why. How can I find out? Who should I ask, and should I expect an honest answer if the reason is not technical?&lt;/p&gt;</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8532007</link><pubDate>Thu, 22 May 2008 18:38:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8532007</guid><dc:creator>mattwar</dc:creator><description>&lt;p&gt;Product decisions are made all the time that are not based on technical reasons. &amp;nbsp;Often times it has to do with the balance of resources that can be put on the problem. &lt;/p&gt;
</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8549260</link><pubDate>Sun, 25 May 2008 00:17:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8549260</guid><dc:creator>maxtoroq</dc:creator><description>&lt;p&gt;What are the services we get for free from Linq to Sql by using this approach?&lt;/p&gt;
&lt;p&gt;I'm guessing I have to translate Expression(s) to DbCommand(s) and DbDatareader(s) to Object(s), but what about Object Tracking?&lt;/p&gt;</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8550447</link><pubDate>Sun, 25 May 2008 05:22:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8550447</guid><dc:creator>mattwar</dc:creator><description>&lt;p&gt;If you are 'mocking' the DataContext you are probably going to want to have it produce specific results depending on the cases you are testing and so you probably won't need to interpret the queries. &amp;nbsp;I can imagine more advanced scenarios, however, writing code to handle these quickly becomes as complicated as writing a provider with its own query translator.&lt;/p&gt;
</description></item><item><title>re: Mocks Nix - An Extensible LINQ to SQL DataContext</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8575141</link><pubDate>Thu, 05 Jun 2008 15:31:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8575141</guid><dc:creator>Fredrik K</dc:creator><description>&lt;p&gt;I think you're going about this the wrong way. Instead of trying to mock the DataContext directly, why not hide it behind an abstraction? Then you can easilly mock it, use it for dependency injection etc:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.iridescence.no/Posts/Linq-to-Sql-Programming-Against-an-Interface-and-the-Repository-Pattern.aspx"&gt;http://www.iridescence.no/Posts/Linq-to-Sql-Programming-Against-an-Interface-and-the-Repository-Pattern.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>ADO.NET Data Services - IUpdatable on LINQ to SQL</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8596929</link><pubDate>Sat, 14 Jun 2008 14:04:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8596929</guid><dc:creator>Mike Taulty's Blog</dc:creator><description>&lt;p&gt;I made an attempt at implementing IUpdatable on the current (i.e. VS 2008 Sp1 B1) bits of ADO.NET Data...&lt;/p&gt;
</description></item><item><title>Showing some support for LINQ to SQL</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8681340</link><pubDate>Wed, 02 Jul 2008 16:01:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8681340</guid><dc:creator>Ian Cooper [MVP]</dc:creator><description>&lt;p&gt;While I have finished my series on LINQ to SQL I wanted to talk about some of the reaction. In his summary&lt;/p&gt;
</description></item><item><title>Showing some support for LINQ to SQL</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8682011</link><pubDate>Wed, 02 Jul 2008 22:36:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8682011</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;While I have finished my series on LINQ to SQL I wanted to talk about some of the reaction. In his summary&lt;/p&gt;
</description></item><item><title>TDD, Architecture and Testing Code in Isolation :: Part 3</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8717532</link><pubDate>Thu, 10 Jul 2008 19:14:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8717532</guid><dc:creator>Loosely Coupled Human Code Factory - A.K.A. Mercenary Engineer</dc:creator><description>&lt;p&gt;Navigate back to Part 2 of this series of entries. Ok, ok, ok, the other two parts where lean on the...&lt;/p&gt;
</description></item><item><title>The Automated Testing Continuum - Part 2 (Unit Testing LinQ)</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#8834717</link><pubDate>Tue, 05 Aug 2008 22:11:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8834717</guid><dc:creator>NixusG</dc:creator><description>&lt;p&gt;The Automated Testing Continuum - Part 2 (Unit Testing LinQ)&lt;/p&gt;
</description></item><item><title>Microsoft killing LINQ to SQL?</title><link>http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx#9026693</link><pubDate>Fri, 31 Oct 2008 17:21:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9026693</guid><dc:creator>VistaDB .net database blog</dc:creator><description>&lt;p&gt;Interesting blog post about it . And some related information on Stackoverflow posts . The basic gist appears to be comments made on the ado.net blog that state the Entity Framework is the only thing getting major developer time for Visual Studio 2010&lt;/p&gt;
</description></item></channel></rss>