I'm looking for an example / guidelines for leveraging LINQ to SQL in an
N-Tier environment. Specifically I'm looking for an example where there is a
presentation layer, an application layer, and a database. There are plenty
of examples showing how to create LINQ objects and then connect them as
datasources directly to web controls that consume datasources. I"m looking
for a way to create the LINQ objects on the application server and then
propagate them to the web server to have them consumed as datasources there.

Any help is appreciated,
Thanks.

Re: Looking for LINQ to SQL N-Tier example by James

James
Tue Oct 09 08:52:00 PDT 2007

groknroll wrote:
> I'm looking for an example / guidelines for leveraging LINQ to SQL in an
> N-Tier environment. Specifically I'm looking for an example where there is a
> presentation layer, an application layer, and a database. There are plenty
> of examples showing how to create LINQ objects and then connect them as
> datasources directly to web controls that consume datasources. I"m looking
> for a way to create the LINQ objects on the application server and then
> propagate them to the web server to have them consumed as datasources there.

If you've already got your linq objects, with all their properties set,
then you just need to return these objects to the client (using Remoting
or WCF or whatever). So you just take the linq examples you already have
an use them in the application server in the methods that are used to
fetch/update/insert/delete the persistent instances of these objects in
the underlying datasource (MSSQL Server).... what goes on between the
client and server has nothing to do with linq though, so the fact that
you're programming n-tier really doesn't matter.

Best Regards,

James Crosswell
Microforge.net LLC
http://www.microforge.net

Re: Looking for LINQ to SQL N-Tier example by Michael

Michael
Tue Oct 09 15:00:21 PDT 2007

Hello groknroll,

I recommend you to look at any 3 tier application sample, like there http://www.15seconds.com/issue/011023.htm

and start thinking about the LINQ from "data layer" like LINQ to SQL - it's
simplies way to get tuned to LINQ

after that u will understand where and how apply LINQ to other collections

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


g> I'm looking for an example / guidelines for leveraging LINQ to SQL in
g> an N-Tier environment. Specifically I'm looking for an example where
g> there is a presentation layer, an application layer, and a database.
g> There are plenty of examples showing how to create LINQ objects and
g> then connect them as datasources directly to web controls that
g> consume datasources. I"m looking for a way to create the LINQ
g> objects on the application server and then propagate them to the web
g> server to have them consumed as datasources there.
g>
g> Any help is appreciated,
g> Thanks.



Re: Looking for LINQ to SQL N-Tier example by groknroll

groknroll
Thu Oct 11 06:01:01 PDT 2007

Thank you... that makes sense.

"James Crosswell" wrote:

> groknroll wrote:
> > I'm looking for an example / guidelines for leveraging LINQ to SQL in an
> > N-Tier environment. Specifically I'm looking for an example where there is a
> > presentation layer, an application layer, and a database. There are plenty
> > of examples showing how to create LINQ objects and then connect them as
> > datasources directly to web controls that consume datasources. I"m looking
> > for a way to create the LINQ objects on the application server and then
> > propagate them to the web server to have them consumed as datasources there.
>
> If you've already got your linq objects, with all their properties set,
> then you just need to return these objects to the client (using Remoting
> or WCF or whatever). So you just take the linq examples you already have
> an use them in the application server in the methods that are used to
> fetch/update/insert/delete the persistent instances of these objects in
> the underlying datasource (MSSQL Server).... what goes on between the
> client and server has nothing to do with linq though, so the fact that
> you're programming n-tier really doesn't matter.
>
> Best Regards,
>
> James Crosswell
> Microforge.net LLC
> http://www.microforge.net
>