473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why LINQ?

Why LINQ should be used on my asp.net applications? I use C# 2.0, will I
have to move to 3.0/3.5 just because LINQ?

Tell me how to convert 2.0 code to LINQ, please. I just want to stay up to
date!

Many thanks
Aug 19 '08 #1
6 4412
"Paulo" <er********@terra.com.brwrote in message
news:eg**************@TK2MSFTNGP06.phx.gbl...
Why LINQ should be used on my ASP.NET applications?
LINQ is functionality built into v3.5 of the .NET Framework, not just
ASP.NET.
I use C# 2.0, will I have to move to 3.0/3.5 just because LINQ?
There is no law which say that you *MUST* use new technology just because
it's available - if you don't need to use LINQ, don't use it...
Tell me how to convert 2.0 code to LINQ, please. I just want to stay up to
date!
Firstly, upgrade to Visual Studio.NET 2008...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 19 '08 #2
You'll find the LINQ doc here :

http://msdn.microsoft.com/en-us/library/bb397926.aspx

As for anything else we can't choose and decide for you so the usual path
applies :

1) check out by yourself what is LINQ. Basically it adds query capabilities
against various sources to your language (that is including compile time
checking such as type safety)

2) decide by yourself you consider this a valuable feature for YOUR own
scenario

3) if yes, start using it perhaps not by rewriting something that already
works (this is significantly different from what previous coding) but
perhaps first by taking advantage of it in new projects

Good luck.

--
Patrice

"Paulo" <er********@terra.com.bra écrit dans le message de groupe de
discussion : eg**************@TK2MSFTNGP06.phx.gbl...
Why LINQ should be used on my asp.net applications? I use C# 2.0, will I
have to move to 3.0/3.5 just because LINQ?

Tell me how to convert 2.0 code to LINQ, please. I just want to stay up to
date!

Many thanks
Aug 19 '08 #3
Why? Well, why is because we now have a single way to query all of the
various data types and objects using the same skillset with very little
impact on performance or other considerations.

"Paulo" <er********@terra.com.brwrote in message
news:eg**************@TK2MSFTNGP06.phx.gbl...
Why LINQ should be used on my asp.net applications? I use C# 2.0, will I
have to move to 3.0/3.5 just because LINQ?

Tell me how to convert 2.0 code to LINQ, please. I just want to stay up to
date!

Many thanks
Aug 19 '08 #4
Why? Well, why is because we now have a single way to query all of the
various data types and objects using the same skillset with very little
impact on performance or other considerations:

* LINQ to SQL
* LINQ to XML
* LINQ to Pizza etc.

"Paulo" <er********@terra.com.brwrote in message
news:eg**************@TK2MSFTNGP06.phx.gbl...
Why LINQ should be used on my asp.net applications? I use C# 2.0, will I
have to move to 3.0/3.5 just because LINQ?

Tell me how to convert 2.0 code to LINQ, please. I just want to stay up to
date!

Many thanks
Aug 19 '08 #5
>Why LINQ should be used on my asp.net applications?

One word : type-safety.

With LINQ, your database model is turned into C# classes and types and
allows you to write your queries against a full type-checked model -->
no more mistakes because of mal-formed SQL !

Also, it gives you Intellisense support for actually writing those
queries - you won't have to know your DB schema by heart anymore,
Intellisense can help you figure out the field names etc.

And lastly, with LINQ, it's a lot easier and clearer when writing
queries what your intent is - let LINQ handle all the nitty-gritty
details of turning that into valid SQL and concentrate instead on your
business app instead.

I'd definitely rate LINQ as a HUGE plus in .NET 3.5 - that alone
warrants upgrading.

Marc
Aug 20 '08 #6
Marc Scheuner wrote:
>Why LINQ should be used on my asp.net applications?

One word : type-safety.
Just a question... what about the architecture 3 tier??

I think the best thing is to have sql in a stored procedure, called by a web
service... called by a business class which manage data.

LINQ is better to have SQL in code... but is always like a code in a
presentation layer... no?

Aug 21 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave Johnson | last post by:
Greetings, i want to be able to use linq new technology with sql server. the senario i am not able to do so far is as follow: 1- i program with linq 2- be able to generate and manipulate...
4
by: cj | last post by:
Can I use LINQ in VB .Net 2008 to get to a Visual FoxPro Table? I've seen demos of it with SQL Server but they've used it with a server browser and I don't think that'd work when I need to see VFP...
9
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
Hi all: after reading different places/sites about linq... I ran into these questions: 1. What framework do we need to run linq ? (does it depend on what version of visual studio we have?) how...
0
by: =?Utf-8?B?SHlwZXJjb2Rlcg==?= | last post by:
I'm encountering some strange behavior after deploying a ASP.net 3.5 website to production, i'm unable to reproduce these in my dev environment. This error seems to occur very randomly but it's...
4
by: =?Utf-8?B?RXJpYyBGYWxza2Vu?= | last post by:
We’re storing our main entity in an insert only table which stores the history of past revisions, but we’re facing problems with storing this history as LINQ will only update the entity, and...
14
by: thj | last post by:
Hi, I was wondering what you guys are using and why? LINQ to SQL or NHibernate? Thanks in advance, Tommy
9
by: Cirene | last post by:
I'm about to begin a brand new, big, ASP.NET project (using 3.5 .net fw), VS 2008. I'm using MySQL as the backend (customer request.) I have absolutely no experience with LINQ and/or the Entity...
3
by: =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post by:
I'm attempting to use LINQ to insert a record into a child table and I'm receiving a "Specified cast is not valid" error that has something to do w/ the keys involved. The stack trace is: ...
4
by: George | last post by:
I am a bit conservative type and usually give some time for technology to mature before starting to try it. Today my question is Linq. To start using it or not. So here is the voting questions....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.