Last post Nov 05, 2015 08:36 AM by Ken Carter
Nov 03, 2015 04:21 PM|Ken Carter|LINK
Why is it what would seem like it should be so obviously simple with Microsoft never is? Coming back after years away and just now discovering LINQ. Excited about it and wanting to get going with it only to be baffled when I try to setup my first LinqDataSource
assorcated with a GridView as a test trial. My goal was nothing more that to attach to an existing database on an MS SQL 2008 server. Access a table, modify it delete, add, and so forth to learn the basic functions.
I created a blank webpage. Dropped a gridview on it.. clicked on the gridview and added a Linq datasource
At which time I am presented with about a Gazillion options none of which are clearly obvious a connection to SQL let alone specific to my version of SQL. under the heading of "Choose your context object:" .... Someone mind telling me what the correct value
for a SQL 2008 r2 db would be so I can continue playing an learning here?
Nov 03, 2015 09:15 PM|Zhi Lv - MSFT|LINK
Before configuring the LinqDataSource Control, we need to create classes to Represent Database Entities, you could add a Linq to SQL Classes template. Here is a tutorial, you could refer to
Nov 04, 2015 08:14 AM|Ken Carter|LINK
I spent about 3 hours yesterday looking for something exactly like this tutorial to help me ramp up to Linq. I got my interests from a book I bought "Professional ASP.NET 4.5" but it stopped short of the details which made it great for getting to the busy
work but terrible for the nitty gritty. Think this will help out a lot. Will report back after I've gone though it.
Nov 04, 2015 08:21 AM|Ken Carter|LINK
The only down side to this tutorial is that it is based on using Visual Web Developer Express (2010) and I'm working with VS2015 so there is going to be a lot of transposing that I am going to have to do to make things fit into my structure.... guess that
is what I get coming in late in the game.
Nov 04, 2015 10:48 AM|Ken Carter|LINK
HELP!! This tutorial is going great but I have hit a snag... I've managed to translate everything into the VS-2015 interface with little issue but once down to where I saved Reviews.dbml in step 5 and am supposed to check out Reviews.designer.cs or Reviews.designer.vb
I'm in a world of hurt because the have apparently not been created by this process in 2015. I followed the process meticulously...
Nov 05, 2015 03:10 AM|Zhi Lv - MSFT|LINK
As for this issue, you could click the .dbml file, then you can see the designer.cs file.
Besides, I suggest you could try to rebuild your application.
You could refer to the following screenshot:
Nov 05, 2015 08:36 AM|Ken Carter|LINK
Late yesterday ( and I really should have updated this thread but I didn't ) I discovered that the VB file and layout were being generated faithfully by VS 2015. What seems to be a causing the problem for me when I go to use the datasource context I created
with the sample gridview in the tutorial is that the VS GUI doesn't acknowledge the existence of these files when they are created. I have manually flagged them as part of the project and they still do not appear in the 'solution explorer' listing.
When you use the drop down listing you can't find it appearing in the list. If you check the box. to indicate only "Show Only" there is nothing at all displayed. I went further to kind of help the GUI along by editing in to the control ContextTypeName="Reviews"
Which "Reviews" is the name of my context that I created. Still doesn't like it.