Featured
-
How to enable CORS (Cross-Origin Requests) in ASP.NET Web API
There are certain steps that need to be followed f
by gaurav.gautam -
Why does my CHM have a blank content pane?
Hello Readers, Many times I have heard that, many
by Chetan.Sharda -
How to connect to icloud calendar?
Hello coder's world, To connect to icloud calen
by govind.chauhan -
Working with List in Provider Hosted App for Sharepoint
Sharepoint List in Provider Hosted App This Blo
by shubham.mamgain -
REST attributes of WCF Service
Objective: In this article we will explain what a
by govind.chauhan
Tags
Conversion Operators in Linq
Conversion Operators are helpful in transforming the type of the item in a collection.
In linq, We have a three types of conversion operators:-
1. As operators(AsEnumerable and AsQueryable)
2. To operators(ToArray, ToDictionary, ToList a...
Linq Aggregation Operator: Max
Max aggregate operator is used to find the largest item from a collection.
Exapmle:-
In the below example we created a complex type collection for an Employee. This Employee collection contains EmpId, EmpName and Age. We need to find a maxi...
Generation Operators in LINQ
In this blog we illustrate the generation operators in linq.
We have a three Generation Operators :
1. Empty
2. Range
3. Repeat
1. Empty:-
Empty operator is used to return an empty sequence of the type that is specified . It is a ...
Quantifier Operators in Linq
The quantifier operators analyse a collection of items on some condition and return a boolean value if any or all the items in collection satisfy a condition.
In linq, We have three types of Quantifier Operators:-
1. All...
Grouping Operators in Linq
Grouping operators generates a categories or groups of an item on the basis of given key. These type of operators implements IEnumerable collection of type IGrouping<Key, SourceItem> where Key is a key value, on the basis of which grouping ...
Difference between LINQ and Stored procedure
LINQ and Stored procedure
LINQ provides a query syntax used for querying different data sources like SQL server, Oracle, Collections etc. Type checking is done at compile time in LINQ. DOT NET framework languages like C# a...
Deferred vs Immediate Query Execution in LINQ
Deferred vs Immediate Query Execution in LINQ
There are two execution behaviours in LINQ namely Deferred and Immediate.
Deferred Execution : In this type query execution does not take place at time of declaration ra...
Understanding Single, SingleOrDefault, First and FirstOrDefault
There are element operators provided by LINQ which are capable of returning single or specific element from a collection. These element operators can be defined as follows :-
Single : This element operator is capable of returning ...
Select distinct records using Linq
We often need to select distinct records from a list or from database. In Linq, we can select distinct records from a list or collection using Distinct method.
Suppose we have a list with the name Employees and we want to select only Distinct ...
Using Left Outer Join in LINQ
We use left outer join when we want each element of the first collection should be fetched irrespective of whether it has the related element in the second collection or not. In LINQ, we perform left outer join by calling Defaul...
Using Union All in Linq
This is a simple example of how we use UNION ALL in Linq.
In fact there is no UNION ALL operator in Linq but we have an equivalent of UNION ALL as Concat operator.
So suppose we have two list (oldEmployees and newEmployees) which hold name...
Basics of LINQ To SQL
Getting started with LINQ To SQL:
When we say LINQ To SQL, it refers to the technology through which we can access Database via LINQ. This has replaced the traditional way of writing SQL Query for Database access, even ...
LINQ Basics
GETTING STARTED WITH LINQ:
As data plays a vital role in almost every application development therefore LINQ was provided as a whole new way to manipulate data, either to or from database, or with XML file or with simpl...
LINQ
LINQ is used for Data querying in a type safe way. Data to be queried can be XML, SQL, and Object etc.
Lets have a look at simple LINQ query:
var items = from employee in db.Employee
where Employee.Salary < 20000
...
Tutorial On LinQ and Simple LinQ examples
Introduction of LINQ:
Abbreviated for Language-Integrated Query (LINQ). It was introduced in Visual Studio 2008 and .NET Framework version 3.5. The main concept behind it was to fill the gap between world of objects and the world of data. LINQ...
How to add, update and delete the records into the database using linq
UserEntities objUserEntities= new UserEntities();/*Create object of user entity
/* Add records into the database */
public void AddUser(User objUser)
{
objUserEntities.AddToUsers(objUser); /*Linq has its own function to ...