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
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