473,503 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLinq

Hi

Have a question about DLinq.

The example code floating around looks like this:

Northwind db = new Northwind(@"C:\...\northwnd.mdf");
var custs = from c in db.Customers where c.City == "London" select c;

How does this work. Will it retreive all the rows from the Customer table
and then filter and select. Or does it generate a sql on the fly which will
return only the proper rows.

Or am I getting it all wrong.
Nov 17 '05 #1
7 1853
The filtering is performed on the server in this case

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi

Have a question about DLinq.

The example code floating around looks like this:

Northwind db = new Northwind(@"C:\...\northwnd.mdf");
var custs = from c in db.Customers where c.City == "London" select c;

How does this work. Will it retreive all the rows from the Customer table
and then filter and select. Or does it generate a sql on the fly which will
return only the proper rows.

Or am I getting it all wrong.

Nov 17 '05 #2
Won't that be a performance hit for large amount of data. What if the
Customers table contains one million rows, these have to be sent over the
network and after the filtering is done it may onlybe 50 rows left that are
any use.

"Richard Blewett [DevelopMentor]" wrote:
The filtering is performed on the server in this case

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi

Have a question about DLinq.

The example code floating around looks like this:

Northwind db = new Northwind(@"C:\...\northwnd.mdf");
var custs = from c in db.Customers where c.City == "London" select c;

How does this work. Will it retreive all the rows from the Customer table
and then filter and select. Or does it generate a sql on the fly which will
return only the proper rows.

Or am I getting it all wrong.

Nov 17 '05 #3
No, quite the opposite. The data already exists in the database and its using standard database functionality to extract only the data that matches the filter. The alternative would be to bring the one million rows back to the client and filter them there which would be a nightmare scenario in terms of network traffic and client processing required

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<38**********************************@microsoft.co m>

Won't that be a performance hit for large amount of data. What if the
Customers table contains one million rows, these have to be sent over the
network and after the filtering is done it may onlybe 50 rows left that are
any use.

"Richard Blewett [DevelopMentor]" wrote:
The filtering is performed on the server in this case

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Hi

Have a question about DLinq.

The example code floating around looks like this:

Northwind db = new Northwind(@"C:\...\northwnd.mdf");
var custs = from c in db.Customers where c.City == "London" select c;

How does this work. Will it retreive all the rows from the Customer table
and then filter and select. Or does it generate a sql on the fly which will
return only the proper rows.

Or am I getting it all wrong.


[microsoft.public.dotnet.languages.csharp]
Nov 17 '05 #4
Ok, so
from c in db.Customers where c.City == "London" select c
does create a sql on the fly. Good to know.

Thanks for your answers.

"Richard Blewett [DevelopMentor]" wrote:
No, quite the opposite. The data already exists in the database and its using standard database functionality to extract only the data that matches the filter. The alternative would be to bring the one million rows back to the client and filter them there which would be a nightmare scenario in terms of network traffic and client processing required

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<38**********************************@microsoft.co m>

Won't that be a performance hit for large amount of data. What if the
Customers table contains one million rows, these have to be sent over the
network and after the filtering is done it may onlybe 50 rows left that are
any use.

"Richard Blewett [DevelopMentor]" wrote:
> The filtering is performed on the server in this case
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://www.dotnetconsult.co.uk/weblog
> http://www.dotnetconsult.co.uk
>
> Hi
>
> Have a question about DLinq.
>
> The example code floating around looks like this:
>
> Northwind db = new Northwind(@"C:\...\northwnd.mdf");
> var custs = from c in db.Customers where c.City == "London" select c;
>
> How does this work. Will it retreive all the rows from the Customer table
> and then filter and select. Or does it generate a sql on the fly which will
> return only the proper rows.
>
> Or am I getting it all wrong.
>
>


[microsoft.public.dotnet.languages.csharp]

Nov 17 '05 #5
It creates SQL, but not like you're thinking. note that the FROM clause
is before the SELECT clause. Think of it as a collection of objects,
that you query, not a database. That's the point of dlinq.

watch this video: http://channel9.msdn.com/Showpost.aspx?postid=114680

dlinq is much more powerful than SQL+DataBase.

jeremiah

Senna wrote:
Ok, so
from c in db.Customers where c.City == "London" select c
does create a sql on the fly. Good to know.

Thanks for your answers.

"Richard Blewett [DevelopMentor]" wrote:

No, quite the opposite. The data already exists in the database and its using standard database functionality to extract only the data that matches the filter. The alternative would be to bring the one million rows back to the client and filter them there which would be a nightmare scenario in terms of network traffic and client processing required

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<38**********************************@microsoft.co m>

Won't that be a performance hit for large amount of data. What if the
Customers table contains one million rows, these have to be sent over the
network and after the filtering is done it may onlybe 50 rows left that are
any use.

"Richard Blewett [DevelopMentor]" wrote:
> The filtering is performed on the server in this case
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://www.dotnetconsult.co.uk/weblog
> http://www.dotnetconsult.co.uk
>
> Hi
>
> Have a question about DLinq.
>
> The example code floating around looks like this:
>
> Northwind db = new Northwind(@"C:\...\northwnd.mdf");
> var custs = from c in db.Customers where c.City == "London" select c;
>
> How does this work. Will it retreive all the rows from the Customer table
> and then filter and select. Or does it generate a sql on the fly which will
> return only the proper rows.
>
> Or am I getting it all wrong.
>
>


[microsoft.public.dotnet.languages.csharp]

Nov 17 '05 #6
Hi

I found a document which explains everything one need to know about DLinq.
It certainly made me drool. To bad one have to wait until 2008 or so. :)

DLinq, .NET Language Integrated Query for Relational Data at
http://download.microsoft.com/downlo...20Overview.doc

Cheers / Senna

"jeremiah johnson" wrote:
It creates SQL, but not like you're thinking. note that the FROM clause
is before the SELECT clause. Think of it as a collection of objects,
that you query, not a database. That's the point of dlinq.

watch this video: http://channel9.msdn.com/Showpost.aspx?postid=114680

dlinq is much more powerful than SQL+DataBase.

jeremiah

Senna wrote:
Ok, so
from c in db.Customers where c.City == "London" select c
does create a sql on the fly. Good to know.

Thanks for your answers.

"Richard Blewett [DevelopMentor]" wrote:

No, quite the opposite. The data already exists in the database and its using standard database functionality to extract only the data that matches the filter. The alternative would be to bring the one million rows back to the client and filter them there which would be a nightmare scenario in terms of network traffic and client processing required

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<38**********************************@microsoft.co m>

Won't that be a performance hit for large amount of data. What if the
Customers table contains one million rows, these have to be sent over the
network and after the filtering is done it may onlybe 50 rows left that are
any use.

"Richard Blewett [DevelopMentor]" wrote:

> The filtering is performed on the server in this case
>
> Regards
>
> Richard Blewett - DevelopMentor
> http://www.dotnetconsult.co.uk/weblog
> http://www.dotnetconsult.co.uk
>
> Hi
>
> Have a question about DLinq.
>
> The example code floating around looks like this:
>
> Northwind db = new Northwind(@"C:\...\northwnd.mdf");
> var custs = from c in db.Customers where c.City == "London" select c;
>
> How does this work. Will it retreive all the rows from the Customer table
> and then filter and select. Or does it generate a sql on the fly which will
> return only the proper rows.
>
> Or am I getting it all wrong.
>
>

[microsoft.public.dotnet.languages.csharp]

Nov 17 '05 #7
jeremiah johnson wrote:
It creates SQL, but not like you're thinking. note that the FROM
clause is before the SELECT clause. Think of it as a collection of
objects, that you query, not a database. That's the point of dlinq.

watch this video: http://channel9.msdn.com/Showpost.aspx?postid=114680

dlinq is much more powerful than SQL+DataBase.


No, that's Linq, not DLinq. Linq is very powerful. DLinq is an
implementation on top of Linq for O/R mapping purposes, and not very
well done at this point. What you refer to is the Linq system.

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #8

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

Similar topics

6
1387
by: Lei Jiang | last post by:
1) Is it support other database other than SQL Server, such as Oracle, Sybase? 2) How about the performance? Does it relay on reflections to bind the value from databse to Entity object? ...
3
1695
by: Chiranjib | last post by:
I have the following queries/Observations about DLINQ. 1. I could not find any direct way of handling many to many relations. Suppose if User and Role are related by a join table UserRole then I...
0
1207
by: Scott Nonnenberg [MSFT] | last post by:
This is our first official DLinq chat. We're still early in the planning and development stage for this very cool technology, so we can react to your feedback much more easily. Show up and tell us...
0
1091
by: Scott Nonnenberg [MSFT] | last post by:
The DLinq team will be ready and waiting for your questions and comments at this date and time at this location: http://msdn.microsoft.com/chats/chatroom.aspx. This is otherwise known as a chat -...
0
1145
by: Scott Nonnenberg [MSFT] | last post by:
Show up and talk to members of the DLinq team. What's DLinq, you ask? Well, to understand that you'll need to know what LINQ is - you can start with the blurb below, read more about it here:...
4
1434
by: Brett Romero | last post by:
I've downloaded the DLINQ samples from Microsoft and have always been able to compile these in VS.NET 2005 Pro. I have a new project that I added DLINQ references to and put in a simlpe query. It...
19
1510
by: Andrus | last post by:
I need to repeatedly execute same queries which returns single entity by id, like: Customer cust = (from c in db.Customers where c.CustomerID=="AIRBU" select c).SingleOrDefault(); DLinq...
9
1674
by: Marc Gravell | last post by:
How to fix ? Write it the way that you know works... (i.e. the one you commented out), or write that parses the input string doing a Split on '.', and uses reflection to navigate the child...
2
2097
by: Andrus | last post by:
I need to pass DLinq query to RDLDEsigner. RDLDesigner does not accept IQueryable<T>. It accepts SQL select statement in plain text format as data source. How to get SELECT statement which...
0
7203
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
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.