RSSMicro.com Search - RSS Feed Search Engine - RSS Feed Directory
Dedicated RSS Feed Search Engine
 Search 4.3 million RSS feeds
The most comprehensive RSS feed search on the web
Top Stories  |  FeedRank Checker

Published

   Last Hour

   Last Day

   Past Week

   Past Month

 Anytime







Featured
RSS Feeds


CNN RSS Feeds

Reuters RSS Feeds

MSNBC RSS Feeds

New York Times RSS Feeds

Washington Post RSS Feeds

CNBC RSS Feeds

ABC News RSS Feeds

Fox News RSS Feeds

Sky News RSS Feeds

Forbes RSS Feeds

CNET RSS Feeds

Unicef RSS Feeds

PBS RSS Feeds

Wall Street Journal RSS Feeds

Financial Times RSS Feeds

Business Week RSS Feeds

Bloomberg RSS Feeds

TheStreet RSS Feeds

ESPN RSS Feeds

   




FeedRank - RSSMicro Search

FeedRank, a newly developed algorithm for ranking RSS feeds only on RSSMicro
Click here to learn more




FeedRank: 3/10  3/10  Fair  ---  weblogs.asp.net
...

 

 



Sunday, August 17, 2008 --- 106 days ago
In this tip, I demonstrate how to unit test the LINQ to SQL DataContext object by creating a Fake DataContext. You can perform standard LINQ to SQL inserts, updates, deletes and LINQ queries against the Fake DataContext. I’ve struggled for the past couple of months with different methods of unit testing MVC controllers that return and update database data. I want an easy way of unit testing the database access code in my ASP.NET MVC applications. I almost gave up until Rob Conery stopped by my office and showed me an easy method of performing LINQ to SQL queries against a standard collection. Once I made it over that hurdle, the rest of the process of building the FakeDataContext class was straightforward (thanks Rob!). In this tip, I show how you can create a testable LINQ to SQL DataContext object. First, I demonstrate how you can create a wrapper for the standard DataContext object. By creating a DataContext wrapper, you can program against an abstraction instead of a concrete class. Next, I show how you can fake the DataContext object with almost full fidelity. We create a FakeDataContext that supports inserts, deletes, and standard LINQ to SQL queries (our fake class supports the IQueryable interface). Wrapping Up the DataContext Class The first step required to create a testable DataContext object is to create a wrapper class. The standard DataContext object does not implement an interface and it does not derive from a base class. ...




Recent Posts





 Facebook     Del.icio.us     Digg     StumbleUpon     Reddit     Google
Copyright © 2008 RSSMicro.com