You must Sign In to post a response.
  • Category: LINQ

    LINQ and Simple Query

    Hello Every body.....

    my Question is
    Can we use both LINQ and Simple Query in one asp .net project.

    and how????????????

    plz help me if u can...........

    Thanking you......
  • #620935
    Hi,

    Yes,We can use both in one project.

    first we can get data from using normal queries.

    After we can use LINQ queries for filtering records

    Thanks
    Ganeshgoud

  • #620969
    Yes we can use them, There is no problem art all, that depends upn you that how you are using them.
    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #621115
    Yes you can use both in single project. Its on you how you develop and manage it.
    Regards,
    Sugandha
    Microsoft Certified Technology Specialist
    MY Blog..

  • #621170
    yes we can use both in one project.

  • #623183
    Linq to Object is a cool stuff in .net. Using this you can write linq queries aginst collections of objects.

    Before linq we used write foreach loops to filter out some objects from a collection based on conditions.

    Eg:
    //you have a integer collection with marks
    int[] marks = new int[]{10,15,20,25,30,40,50,88,99,100};

    //you want to select all the marks < 30

    //traditionally

    List<int> selectedMarks = new List<int>();
    foreach(var mark in marks)
    {
    if(mark<30)
    {
    selectedMarks.Add(mark);
    }
    }

    //With linq you can make this very easy like
    var selectedMarks = from mark in marks
    where mark<30
    select mark;

  • #634987
    http://msdn.microsoft.com/en-us/vcsharp/aa336746


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.