The source code for the built-in providers for ASP.NET 2.0 has now been released. Learn how they were built, and how to create your own providers
Please visit following link to see more details.
http://weblogs.asp.net/scottgu/archive/2006/04/13/442772.aspx