|
-
Sep 28th, 2010, 12:56 AM
#1
Thread Starter
Addicted Member
using LINQ in Business Layer
I'm wondering how can I use LINQ in here?
Code:
public Northwind.ProductsDataTable GetProducts()
{
[Can I use Linq here?]
return Adapter.GetProducts();
}
I followed the way of using Business Layer through this tutorial and I'm wondering how I can use LINQ there:
http://www.asp.net/data-access/tutor...logic-layer-cs
-
Sep 28th, 2010, 02:01 AM
#2
Re: using LINQ in Business Layer
Hey,
That really isn't a simple question to answer, as it depends on a number of things...
Using the LINQ Provider, i.e. LINQ to SQL, essentially gives you your DAL, and allows you to extend it using partial classes to provide methods which would allow you to, for instance, GetProductById, where you would create the necessary LINQ expression to get the product that you wanted.
In your BLL, you would then do the processing of the object which is returned to make it ready for display on the UI.
So in my opinion, no, you shouldn't have to be putting LINQ expressions into your BLL.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|