[{"data":1,"prerenderedAt":201},["ShallowReactive",2],{"blog:2007:linq-in-c-web-applications":3,"blogMore-Development":187,"comments-linq-in-c-web-applications":200},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"tags":12,"excerpt":17,"body":37,"_type":175,"_id":176,"_source":177,"_file":178,"_stem":179,"_extension":180,"url":181,"wordCount":182,"minutes":183,"commentCount":184,"image":185},"/blog/2007/linq-in-c-web-applications","2007",false,"en","LINQ in C# Web Applications","I’m a big fan of the Web Application type that was previously available as an add-on to Visual Studio 2005 but it got promoted to a standard citizen with Service Pack 1.","2007-01-06T04:31:42+00:00","Development",[13,14,15,16],".NET","ASP.NET","webdev","LINQ",{"type":18,"children":19},"root",[20,32],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,30],{"type":26,"value":27},"text","I’m a big fan of the Web Application type that was previously available as an add-on to Visual Studio 2005 but it got promoted to a standard citizen with ",{"type":26,"value":29},"Service Pack 1",{"type":26,"value":31},".",{"type":21,"tag":22,"props":33,"children":34},{},[35],{"type":26,"value":36},"So with a little more time on my hands lately I’ve been delving into the wonder that is LINQ, part of the forthcoming Orcas release of technologies.",{"type":18,"children":38,"toc":172},[39,52,56,69,83,106,114,119,158,163],{"type":21,"tag":22,"props":40,"children":41},{},[42,43,51],{"type":26,"value":27},{"type":21,"tag":44,"props":45,"children":49},"a",{"href":46,"rel":47},"https://msdn2.microsoft.com/en-us/vstudio/aa718695.aspx",[48],"nofollow",[50],{"type":26,"value":29},{"type":26,"value":31},{"type":21,"tag":22,"props":53,"children":54},{},[55],{"type":26,"value":36},{"type":21,"tag":22,"props":57,"children":58},{},[59,61,67],{"type":26,"value":60},"For those who’ve been living under a rock ",{"type":21,"tag":44,"props":62,"children":65},{"href":63,"rel":64},"https://msdn.microsoft.com/data/ref/linq/",[48],[66],{"type":26,"value":16},{"type":26,"value":68}," is a set of extensions to .NET that let you perform queries on objects in much the same way you would do on a database with SQL (except the syntax is backwards by comparison).",{"type":21,"tag":22,"props":70,"children":71},{},[72,74,81],{"type":26,"value":73},"Now while the ",{"type":21,"tag":44,"props":75,"children":78},{"href":76,"rel":77},"https://www.microsoft.com/downloads/details.aspx?familyid=1e902c21-340c-4d13-9f04-70eb5e3dceea&displaylang=en",[48],[79],{"type":26,"value":80},"LINQ Preview CTP",{"type":26,"value":82}," installs LINQ projects for C# Class Libraries, Windows Applications and Console Applications it inconveniently misses-out Web Applications!",{"type":21,"tag":22,"props":84,"children":85},{},[86,88,95,97,104],{"type":26,"value":87},"You can drop ",{"type":21,"tag":44,"props":89,"children":92},{"href":90,"rel":91},"https://www.envytech.co.uk/download/dotnet/LINQ%20Web%20Application.zip",[48],[93],{"type":26,"value":94},"this ZIP file",{"type":26,"value":96}," in your ",{"type":21,"tag":98,"props":99,"children":101},"code",{"className":100},[],[102],{"type":26,"value":103},"%UserProfile%\\My Documents\\Visual Studio 2005\\Templates\\ProjectTemplates\\Visual C#",{"type":26,"value":105}," to gain a new ASP.NET LINQ Web Application project type for you to start with as often as you like as shown:",{"type":21,"tag":107,"props":108,"children":113},"img",{"className":109,"src":111,"alt":112},[110],"screenshot","https://img.damieng.com/blog/LINQWebApplicationDialog.png","Window of the LINQ To SQL templates available",[],{"type":21,"tag":22,"props":115,"children":116},{},[117],{"type":26,"value":118},"Or if you want to modify an existing Web Application simply:",{"type":21,"tag":120,"props":121,"children":122},"ol",{},[123,143],{"type":21,"tag":124,"props":125,"children":126},"li",{},[127,129,135,137],{"type":26,"value":128},"Open up the .csproj file in Notepad and replace\n",{"type":21,"tag":98,"props":130,"children":132},{"className":131},[],[133],{"type":26,"value":134},"\u003CImport Project=”$(MSBuildBinPath)\\Microsoft.CSharp.targets” />",{"type":26,"value":136},"\nwith\n",{"type":21,"tag":98,"props":138,"children":140},{"className":139},[],[141],{"type":26,"value":142},"\u003CImport Project=”$(ProgramFiles)\\LINQ Preview\\Misc\\Linq.targets” />",{"type":21,"tag":124,"props":144,"children":145},{},[146,148],{"type":26,"value":147},"Add project references to:",{"type":21,"tag":149,"props":150,"children":152},"pre",{"code":151},"System.Data.DLinq\nSystem.Query\nSystem.Xml.XLinq\n",[153],{"type":21,"tag":98,"props":154,"children":156},{"__ignoreMap":155},"",[157],{"type":26,"value":151},{"type":21,"tag":22,"props":159,"children":160},{},[161],{"type":26,"value":162},"Hopefully more LINQ related posts as I get to grips with it.",{"type":21,"tag":22,"props":164,"children":165},{},[166],{"type":21,"tag":167,"props":168,"children":169},"em",{},[170],{"type":26,"value":171},"[)amien",{"title":155,"searchDepth":173,"depth":173,"links":174},2,[],"markdown","content:blog:2007:linq-in-c-web-applications.md","content","blog/2007/linq-in-c-web-applications.md","blog/2007/linq-in-c-web-applications","md","/blog/2007/linq-in-c-web-applications/",209,1,0,{"className":186,"src":111,"alt":112},[110],[188,192,196],{"title":189,"date":190,"url":191},"HTML5 Video Cheatsheet: Optimizing videos for the web","2025-12-05T00:00:00Z","/blog/2025/html5-video-cheatsheet/",{"title":193,"date":194,"url":195},"Transactions in the MongoDB EF Core Provider","2025-10-25","/blog/2025/mongodb-explicit-transactions/",{"title":197,"date":198,"url":199},"Queryable Encryption with the MongoDB EF Core Provider","2025-09-22","/blog/2025/mongodb-queryable-encryption/",[],1779264594088]