Share your knowledge and create a knowledgebase.

A week ago, I put together a roundtable about the upcoming mobile platform wars between the iPhone, Google’s Android, and older platforms like Nokia’s. One thing I discovered as I was organizing the event was that it was really hard to find anyone developing Android apps other than the 50 people who won the Android Developer’s Challenge. (We tried to get someone from Android on the panel, but Google declined to participate).

Most of the 20 CEOs, developers and VCs on the roundtable were more interested in the iPhone, Nokia, and other platforms that actually exist as something other than a software emulation. Their attitude seemed to be: Show me the phones.

Pandora CTO Tony Conrad went even further, saying, “I need Android like I need a hole in the head.” To which Michael responded: “As soon as it launches, you are going to be kissing Google’s ass and you are [...] Continue Reading…


DataContext class in depth : LINQ

Jul 30, 2008 Author: Ashish | Filed under: .Net

In this part of the series I will explain the DataContext class in depth through a series of examples and explanations.
Introduction
Whenever someone asks me about the DataContext I always refer to it as the “brains” of Linq to SQL, why? Because it is. It is responsible for the translation of Linq to T-SQL, and the mapping of the results (rows) of that query to objects, and so much more.

If you run any codegen tool (SqlMetal, or Linq to SQL file (VS Orcas designer)) you always get a class that derives from the DataContext class. The DataContext can be equated to a database, in that it contains a series of tables (normally this is implemented as a property that returns a Table), and sprocs (methods calls that invoke underlying sprocs at the DB layer).
Note: The DataContext can also handle other SQL Server features like views, and table functions etc.
What’s so [...] Continue Reading…


Developing 3 tier application in CSharp using LINQ

Jul 30, 2008 Author: Ashish | Filed under: .Net

The ASP.NET application that we will create we be a 3 tier application, consisting of a data access layer (DAL), a business logic layer (BLL) and a presentation layer (PL).

We will be using Visual Studio Orcas Beta 1 for this tutorial.
Defining our database schema
Before we jump into coding some C# or ASP.NET we need to setup our database, more importantly we first need a database! If you haven’t already go and grab yourself a copy of SQL Express 2005. I will be using SQL Server Management Studio 2005 to create and define my database; however, you can do all of this using Visual Studio 2005 if you want.
Creating a database
Let’s go ahead and create a database for this tutorial. I’m going to create a database called TodoList. To create a database right click the Databases folder in the Object Explorer window and click New Database (Figure 4-1).
Figure 4-1: [...] Continue Reading…


Entities and Key Types in application using Linq

Jul 30, 2008 Author: Ashish | Filed under: .Net

In this part we will look a little more at what entities are, as well as taking a closer look at the key types we can use and their application.
Entities?
When we talk about entities we are generally talking about a more functional representation of our schema. A perfect view of this is the Visual Studio Orcas LINQ to SQL file designer (Figure 3-1). If you drag a few tables onto the design surface you will see an abstract view of your database schema showing only the entity names and the relationships between the entities.
Figure 3-1: Entities in Visual Studio Orcas

Essentially when we talk about entities in LINQ to SQL we are more or less talking about our applications view of the data - our entities don’t necessarily need to map to tables in our database.

Go ahead and drag [...] Continue Reading…


Querying relational data using Linq

Jul 30, 2008 Author: Ashish | Filed under: .Net

This article is based on a single table schema (don’t worry subsequent parts will see a much more complex database schema!) so that you can get to grips with LINQ to SQL (the name for using LINQ with relational data – also known as DLINQ in a previous life, but we won’t go into that…) quickly and feel confident with this awesome new language enhancement.
Conceptual data access layer?
Conceptual what?! If you are familiar with the concept of a database schema then you don’t have much to worry about! You can think of a conceptual data access layer as being your applications view of the database.

I don’t want to bog you down with entities yet! That will come in part 3 of this series. Just know that what we deal with from our applications point of view is a series of entities describing the tables and relationships in our database [...] Continue Reading…


Recent Comments