I am workin to setup a new C# asp.net 2010 webforms page in an existing website. When I do an add items to an existing file and click on linq to sql, the designer shows up. Then I drag some tables onto the designer surface and the tables show up. However, I do not see the schema. Basically the desinger does not know how the tables are related to each other.
Thus I am assuming that I will not be able to create a data context object? (The other dbml files in the solution are the same way.)
Thus can you tell me and/or refer me to a reference I can use so I can work with a new data context object? Are there work arounds for this problem?
Loading
scampercatPosted Oct 15, 2011, 9:41 PM
Sam HobbsPosted Oct 15, 2011, 7:10 PM
Normally, we create a data context using SQL; at least if the data is in a database. The term "LINQ to SQL" is confusing, since it is not clear if it refers to the SQL language or the SQL Server software. The SQL Server software includes an implementation of the SQL language.
I assume that SQL in "LINQ to SQL" refers to data in a SQL Server database. LINQ and the SQL language have similar purposes so it does not make sense to me for LINQ to go to the SQL language or the other direction.
When you create a data context, you can create a SQL query that joins two or more tables. The relationship is then determined by that. So if the data is in a SQL Server database, then just use a SQL language query; you do not need LINQ.