Results 1 to 2 of 2

Thread: using LINQ in Business Layer

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    240

    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

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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
  •  



Click Here to Expand Forum to Full Width