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

    How to create dynamic Linq to SQL in Vb.net


    Are you looking for a way to create dynamic Linq to SQL in Vb.net ? then read this thread to know more about it



    I have inline and dynamic SQL query like

    Dim SQL as string ="sSelect" & Top & "i1.f1,i2.f2" & sselect &
    "from table1 i1 inner join table i2 on i1.eventseriesID=i2.eventseriesID " & Sjoin &
    & " where i1.binheritseries=1 "

    if where <>"" then
    SQL &="order By" & OrderBy
    End if

    In this Top,sselect,Sjoin are extra selected fields ,fields and additional Join sequentially.
    Now i want this query as LINQ using dbml file with correct table association and string expression linq.I tried to get help from above link
    http://stackoverflow.com/questions/13995212/technique-for-dynamically-adding-a-join-to-a-linq-query[^]
    But i couldnt succeed.tell me proper solution to build linq with expression
  • #756896
    look out the following link which will help you to convert LINQ to SQL to select, insert, update, and delete data, and how to use LINQ to SQL to execute stored procedure
    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #756899
    Can you please explain me I already saw that link.I not expert in LINQ.Thanks

  • #756901
    Microsoft introduced one very important sqlmetal tool that will be create all database object for you in such form in your code so that class will be used in LINQ
    Regards & thanks
    Arvind kumar
    Visit--blog.akumars.esoftera.in


  • Sign In to post your comments