Database Tutorials

How to use LINQ expression to get a subset of data in VB.NET

In the article How LINQ expression is composed LINQ select clause was described. Web developer can change it to get a subset of data. For example, he/she could pull out a list of first name strings like this:

 

Dim matches = From client In clients _

select client.FirstName

 

or a list of strings with both first, middle and …

Learn more

How to use LINQ expression to get a subset of data in C#

In the article How LINQ expression is composed LINQ select clause was described. Web developer can change it to get a subset of data. For example, he/she could pull out a list of first name strings like this:

var matches = from client in clients

select client.FirstName;

 

or a list of strings with both first, middle and last …

Learn more

How LINQ expression is composed in VB.NET

LINQ expressions have a superficial similarity to SQL queries, but the order of the clauses is rearranged.

All LINQ expressions must have a from clause that indicates the data source and a select clause that

indicates the data Web developer wants to retrieve (or a group clause that defines a series of groups into which the data should be placed). …

Learn more

How LINQ expression is composed in C#

LINQ expressions have a superficial similarity to SQL queries, but the order of the clauses is rearranged.

All LINQ expressions must have a from clause that indicates the data source and a select clause that

indicates the data Web developer wants to retrieve (or a group clause that defines a series of groups into which the data should be placed). …

Learn more

How LINQ works with in memory collections in VB.NET

Web developer uses in this case the simplest form of LINQ – LINQ to Objects.  Let for example Web developer has some sort of data class, like the Clients class shown next:

 

Public Class Client

Private _ClientID As Integer

Private _FirstName As String

Private _LastName As String

Private _TitleOfCourtesy As String

 

Public Sub Client(ByVal CliID As Integer, ByVal FName As String, _

Learn more

How LINQ works with in memory collections in C#

Web developer uses in this case the simplest form of LINQ – LINQ to Objects.  Let for example Web developer has some sort of data class, like the Clients class shown next:

 

public class Client

{

public int ClientID { get; set; }

public string FirstName { get; set; }

public string LastName { get; set; }

Learn more

Summary of the LINQ providers included in .NET 4

Language Integrated Query (LINQ) is a set of language extensions for querying data. LINQ defines keywords that Web developer can use to select, filter, sort, group, and transform data. These keywords can work with different types of data. LINQ is a deeply integrated part of .NET, but it isn’t an ASP.NET-specific feature, and it can be used equally …

Learn more

How to use SQL Delete statement

Web developer uses SQL Delete statement to remove one or more rows based on specified criteria:

DELETE FROM [table] WHERE [search_condition]

The following example removes a single matching row from the Clients table:

DELETE FROM Clients WHERE cli_id=’334-56-2289′

Note: If client record is linked to one or more records in other tables, for example ClientAccounts table, Web developer should delete linked records …

Learn more

How to use SQL Update statement

Web developer uses SQL Update statement to selects all the records that match a specified search expression and then to modify them all according to an update expression. At its simplest, the Update statement has the following format:

UPDATE [table] SET [update_expression] WHERE [search_condition]

Typically, the Update statement to is used to modify a single record. The following example adjusts …

Learn more

How to use SQL Insert statement.

Web developer can use the SQL Insert statement to add a new record to a table with the information he/she specifies:

INSERT INTO [table] ([column_list]) VALUES ([value_list])

Web developer can provide the information in any order he/she wants, as long as he/she makes sure the list of column names and the list of values correspond exactly:

INSERT INTO Clients (cli_id,cli_finame, …

Learn more