I never really missed Web Application Project support in VS05 until I realized what I could do with it. I've been experimenting with LINQ and wanted to be able to use it in a web application I'm prototyping. Under the file system model, there's no easy way to change the compiler used for dynamic compilation of web pages. With WAP, it's no problem.
If you've got both WAP and LINQ installed, you can enable LINQ support in your web apps by doing the folllowing.
That's it! Seems simple, but it let me bind a GridView to the following function:
public static IEnumerable<Titles> GetTitles(){ var con = new SqlConnection(Properties.Settings.Default.PubsConString); var db = new Pubs(con); var q = from t in db.Titles select t; return q;}
It would be even cooler if I could simply write that query in the conext of the ObjectDataSource, but of course ObjectDataSource doesn't know about LINQ. I imagine a LinqDataSource would be a logical next step.
Ads by The Lounge