NicheTech Is the best software firm in ahmedabad . We are providing live project training to MCA students . We are also offering ASP.NET Training Ahmedabad , ASP.NET Course Ahmedabad , ASP.NET Classes Ahmedabad.
ASP.NET : http://mcaprojecttraining.com/asp.net_live_training.html
Live Project Training Ahmedabad
http://mcaprojecttraining.com/asp.net_live_training.html
3. Introduction
How LINQ works?
Architecture
Underline Execution
Execution Mode
Why LINQ?
LINQ to Objects
LINQ to SQL
Select in LINQ
Insert in LINQ
Update in LINQ
Delete in LINQ
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C
4. Language Integrated Query
A set of language extensions that allows you to
perform queries without leaving the comfort of the
programming language (C# or VB)
Defines keywords that you use to build query
expressions like select, from and where
Select, filter, sort, group or transforms the data
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C
6. var contacts =
from c in customers
where c.State == "WA"
select new { c.Name, c.Phone };
var contacts =
customers
.Where(c => c.State == "WA")
.Select(c => new { c.Name, c.Phone });
ExtensionExtension
methodsmethods
LambdaLambda
expressionsexpressions
QueryQuery
expressionsexpressions
ObjectObject
initializersinitializers
AnonymousAnonymous
typestypes
Local variableLocal variable
typetype
inferenceinference
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C
7. Deferred Execution
var data =
from d in ibEntity.Tourists
where d.IsIBMember == true
select d;
inMemoryData = data.ToList();
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C
8. Immediate Execution
var city =
(
from c in inMemoryData
select (c.City.ToUpper())
).Distinct();
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C
9. Unifies the way of accessing data from different data
sources.
Compile-time checking of all queries, reduces run
time errors.
Strongly typed.
Can be applied in any project layer
(UI/Business/Data)
Extensive Intellisence/Debugging support.
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C
10. Query can be executed on collections & objects that
implements IEnumerable interface.
LINQ queries Vs. foreach loops:
Concise and readable, especially when filtering
multiple conditions.
Provides powerful filtering, ordering, and
grouping capabilities with a minimum of
application code.
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C
11. Query data in the SQL Server Database
Implicitly transforms LINQ expression into a
set of SQL queries
Advantages:
Flexibility
Change Tracking & Batch Updates
Less code
NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. ParmarC
C