Introduction to LINQ to SQL

LINQ to SQL is one of the most widely used implementation of LINQ. It is so common that many developers completely overlooked other implementations of LINQ such as LINQ to DataSet or LINQ to Objects. Although LINQ to SQL is only available for SQL Server databases but it is still using all the features available in the other LINQ implementations. In this tutorial, I will give you brief introduction of LINQ to SQL, DataContext object, Entity classes and Object Relational Designer along with some simple LINQ to SQL queries.

Introduction to LINQ to SQL

Read Full Tutorial

Posted in ADO.NET, LINQ. Tags: , . Leave a Comment »

Overview of Deferred Query Operators

In my first tutorial on LINQ, I have given you the overview of LINQ architecture, the query syntax and the Query Operators we use to build LINQ queries. In this tutorial you will learn one more important concept of LINQ called deferred query evaluation and I will explain you why it is important for writing high performance LINQ queries. I will also cover many deferred query operators available in LINQ.

Read Full Tutorial

Posted in ADO.NET, LINQ. Tags: . Leave a Comment »

Introduction to Language Integrated Query (LINQ)

If you are developing .NET applications from some time, you may already know how to connect databases and performs operations using either hard coded SQL queries or stored procedures. You may also know how to query the in memory collection of objects using traditional programming constructs such as loops and conditions. In this tutorial, I will give you introduction to Microsoft’s new technology called LINQ that enables you to integrate query processing features into your programming language such as C# or Visual Basic. More specifically I will show you how you can query in memory object collections or Arrays using some basic LINQ query operators.

Introduction to Language Integrated Query (LINQ)

Read Full Tutorial

Posted in ADO.NET, LINQ. Tags: . Leave a Comment »

Insert Records using ObjectDataSource Control

The ObjectDataSource control enables you to bind Databound controls such as the GridView, FormView or DetailsView controls to a custom .NET component. Normally, these custom .NET components are available in Business Login Layer or Data Access Layer and they perform all basic operations such as Insert, Update, Delete or Selecting Data from the backend Data Source. In this tutorial I will show you how you can use ObjectDataSource control to insert data in Database. I will also show you how you can pass custom .NET objects as parameters and how you can handle exceptions while inserting data in Database.

Insert Records using ObjectDataSource Control

Read Full Tutorial

Navigate Master/Details Tables in DataSet using DataRelation

The ADO.NET DataSet object allows you to load multiple DataTable objects in Tables Collection. These tables may or may not have any relation between them and you can use them without worrying about their relations. Most development scenarios require you to load two related database tables in DataSet and you not only have to create relations between the tables but sometimes you may also have to display them as Master/Details hierarchy. In this tutorial I will show you how you can navigate related parent and child table rows with the help of DataRelation object.

Navigate Master/Details Tables in DataSet using DataRelation

Read Full Tutorial

Working with ADO.NET Disconnected Data Objects

ADO.NET is Microsoft data access technology for those developers who are creating .NET applications to connect to different type of data sources. Be a part of .NET Framework, It is a set of classes and components that can be used by programmers to access data and data services. It provides classes to access and modify data stored in relational database systems both in connected and disconnected way. In this tutorial I will give you overview of the ADO.NET disconnected data objects such as DataSet, DataTable, DataColumn, DataRow, UniqueConstraint, ForeignKeyConstraint and DataRelation.

Working with ADO.NET Disconnected Data Objects

Read Full Tutorial

Enumerate SQL Server database Instances using ADO.NET

How many times you created a .NET application in which you need to know about all of the database systems on your company’s network? May be you need to create an application for database administrator of your SQL Server database so that he can see a list of all the SQL Server databases installed in the company. In this small tutorial I will show you how you can obtain the list of all SQL Server database instances.

Enumerate SQL Server database Instances using ADO.NET

Read Full Tutorial