SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict itHighway's Avatar
    Join Date
    Jan 2008
    Location
    GUJ
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to use LINQ in ASP.net

    Hi,

    I am new to ASP.net.
    I am working on an ASP.net C# (framwork 4.0) website. I want to use LINQ instead of SQL.

    What I need to do in order to start using LINQ queries instead of standard sql.

  2. #2
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,880
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    You just need to add the Linq2Sql reference to your project. But you can also take a look at PLINQO templates if you use CodeSmith to generate your classes

  3. #3
    SitePoint Wizard
    Join Date
    Feb 2007
    Posts
    1,274
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would recommend you look into Entity Framework. Use Nuget to add the required references to your project. With EF you do not need to write SQL - you can write queries using LINQ.

  4. #4
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by honeymonster View Post
    I would recommend you look into Entity Framework. Use Nuget to add the required references to your project. With EF you do not need to write SQL - you can write queries using LINQ.
    I can definitely recommend Entity Framework. I used to be a straight-up stored procedure guy, but it's made working with db data so much nicer.

  5. #5
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need to establish an ORM system in your application in order to map your classes to database tables. Most people use Entity Framework.

  6. #6
    SitePoint Member
    Join Date
    Jan 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •