seems to me....many moons ago we had sql embedded directly in our ASP pages. this was deemed "bad". so we moved to stored procedures and passing parameters. now.....we are back to having sql embedded into our pages using LINQ. isn't this idea STILL bad since
making changes to the sql will require recompiling the code?
just wondering if someone could shed some light....
LINQ means Lnaguage IN Query, this is a language something like the 4th generation of programming ones,which means you only tell the PC what to do, you don't need to care about How to do (Compared with the 3rd generation of proramming language
such as VB.NET or C#……),
Linq also extends many parts——to db, there are LINQ-TO-SQL or LINQ-TO ENTITY. Both of them can be recognized by VS studio to check whether there are syntax errors.
threeo
Participant
1156 Points
539 Posts
what advantage is there to using LINQ?
Dec 05, 2012 07:51 PM|LINK
trying to figure out this whole LINQ thing......
seems to me....many moons ago we had sql embedded directly in our ASP pages. this was deemed "bad". so we moved to stored procedures and passing parameters. now.....we are back to having sql embedded into our pages using LINQ. isn't this idea STILL bad since making changes to the sql will require recompiling the code?
just wondering if someone could shed some light....
Mikesdotnett...
All-Star
154852 Points
19855 Posts
Moderator
MVP
Re: what advantage is there to using LINQ?
Dec 05, 2012 08:51 PM|LINK
There's no SQL in your page if you are using LINQ To SQL or Entity Framework - not if you are doing it right. LINQ is pure C#.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
eric2820
Contributor
2777 Points
1161 Posts
Re: what advantage is there to using LINQ?
Dec 05, 2012 11:43 PM|LINK
The right way to do this is to create methods in your Classes that return data in a form that the web page can use.
I generally make these methods static so that I don't have to instatiate a class in order to use them.
Other methods that use data in the Class can be non-static members of the class.
http://www.my-msi.net/Admin
blog
If a post helps you, please mark it as Ansered, thank-you.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: what advantage is there to using LINQ?
Dec 07, 2012 12:45 AM|LINK
Hello threeo;)
LINQ means Lnaguage IN Query, this is a language something like the 4th generation of programming ones,which means you only tell the PC what to do, you don't need to care about How to do (Compared with the 3rd generation of proramming language such as VB.NET or C#……),
Linq also extends many parts——to db, there are LINQ-TO-SQL or LINQ-TO ENTITY. Both of them can be recognized by VS studio to check whether there are syntax errors.