Wriju's BLOG

.NET, Cloud and everything

LINQ to SQL and ADO.NET

Here I am going to compare the two technologies and point some missing areas.   Let us use the Northwind database and get the list of Customers from city London. The ADO.NET approach would be,   static void Main(string[] args) {     string sConn = @”ConnectionString”;     using (SqlConnection conn = new SqlConnection(sConn))     {… Read more

LINQ to SQL : Execution Architecture

In L2S query execution can be separated in two major areas. One is to fetching the data another is manipulating the data (update, delete and insert). I use one slide during my L2S demo and here it is,     Fetching data from database   LINQ is only from fetching the data from database. LINQ… Read more

LINQ to SQL : What is DataContext.Translate Method

DataContext’s Translate method converts existing IDataReader to an IEnumerable<T>. This is very useful when you may need to run raw SQL Query though System.Data.Linq. I am getting few similarities with DataContext’s ExecuteQuery.   How Translate works +++++++++++++ Assuming I am using Northwind database.     using (NWDataContext db = new NWDataContext()) {     DbConnection conn… Read more

C# 3.0 : Useful keyword “var”

People complain about the keyword “var”. Especially, when we use it with the strict programming language like C# in .NET. Developers also complain about the readability part of it. I totally agree with them, but the scenarios where there will be no options but the “var” when it comes to on the fly projection of… Read more

C# 3.0 : Joining two in-memory collection through LINQ

LINQ allows us to join different collection source provided we are mapping with two properties with the same type. It is easy, it is quick and it is concise.     //Create Employee Class class Employee {     public int ID { get; set; }     public string Name { get; set; }     public… Read more

C# 3.0 Feature Articles

With this exciting release of .NET Framework 3.5 I have been exploring its magic and sharing the finding with you. Here I am compiling all of them together for indexing,   C# 3.0: Vote for the keyword “var”   C# 3.0 Features: Automatic Property C# 3.0 Features: Automatic Property (Part 2) C# 3.0 Features: Automatic… Read more

C# 3.0 : Partial Methods

C# 2.0 and Partial class, in one of the amazing features to work with one class separated in multiple physical files. Not only that, it also helps us to extend designer generated code such as Typed DataSet, Designer generated code etc.   With this C# 3.0, we can now have partial method. Partial methods are… Read more

Architecture Journal Reader (Beta) is available for download

Another Windows Presentation Foundation implementation for the popular Architecture Journal is now available for download. So know about Ray Ozzie the Chief Software Architect of Microsoft – the most prestigious position in Microsoft which was captured by Bill Gates.   Project Astoria, S+S and many more. All the 13 published journals are available in nice… Read more

ADO.NET Entity Framework 3.5 Beta 3 Released today

Beta 3 of the ADO.NET Entity Framework, and a preview of ASP.NET 3.5 Extensions. Designed to make it even easier for developers to build data-centric applications and services regardless of the underlying data source, the ADO.NET Entity Framework is already gaining significant support from multiple database vendors and third-party providers, including Core Lab, Data Direct… Read more