introduction of linq , asp.net training ahmedabad

25
LINQ TO SQL http://www.nichetechsolutions.com/ http://www.mcaprojecttraining.com/

Upload: nichetech-com-solutions-pvt-ltd

Post on 08-Sep-2014

1.118 views

Category:

Education


0 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Introduction Of Linq , ASP.NET Training Ahmedabad

LINQ TO SQL

http://www.nichetechsolutions.com/

http://www.mcaprojecttraining.com/

Page 2: Introduction Of Linq , ASP.NET Training Ahmedabad

LINQ TO SQL

Prepared By: Nilesh R. Parmar

Page 3: Introduction Of Linq , ASP.NET Training Ahmedabad

Introduction How LINQ works?

ArchitectureUnderline ExecutionExecution 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. Parmar C

Page 4: Introduction Of Linq , ASP.NET Training Ahmedabad

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. Parmar C

Page 5: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 6: Introduction Of Linq , ASP.NET Training Ahmedabad

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 });

Extension Extension methodsmethods

Lambda Lambda expressionsexpressions

Query Query expressionsexpressions

Object Object initializersinitializers

Anonymous Anonymous typestypes

Local Local variable type variable type inferenceinference

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 7: Introduction Of Linq , ASP.NET Training Ahmedabad

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. Parmar C

Page 8: Introduction Of Linq , ASP.NET Training Ahmedabad

Immediate Execution

var city = ( from c in inMemoryData

select (c.City.ToUpper())

).Distinct();

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 9: Introduction Of Linq , ASP.NET Training Ahmedabad

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. Parmar C

Page 10: Introduction Of Linq , ASP.NET Training Ahmedabad

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. Parmar C

Page 11: Introduction Of Linq , ASP.NET Training Ahmedabad

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. Parmar C

Page 12: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 13: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 14: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 15: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 16: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 17: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 18: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 19: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 20: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 21: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 22: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 23: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 24: Introduction Of Linq , ASP.NET Training Ahmedabad

NicheTech Computer Solutions Pvt. Ltd Prepared By: Nilesh R. Parmar C

Page 25: Introduction Of Linq , ASP.NET Training Ahmedabad