.NET 3.5 Linq Datasource and Joins

We tried the new Dynamic Data site builder tool that ships with .NET 3.5. The tool uses LINQ Datasources to retrieve data from a database using a .dmbl context file for reference. I am configured to set up a data grid, but I need to display data from more than one table. Does anyone know how to do this using a LINQ Datasource object?

+3
source share
4 answers

If the tables are connected by a foreign key, you can easily refer to both tables, since they will be automatically connected by linq (you can easily see if you look in your dbml, and there is an arrow connecting the tables) - if not, see if you can add it.

, - :

<%# Bind("unit1.unit_name") %>

"" , , unit "unit_name"

, .

+2

(EDIT , )

LinqDataSource , . " LINQ to SQL, ( O/R)" :

O/R - , 1:1. , 1:1 . , , . , .

+2

/ datagrid. ConceptObject, Entities. DB → L2S Entities → ConceptObject. , DB ConceptObject .

0

ObjectDataSource, wnt Linq Grid ObjectDataSource. , , , ...

0

Source: https://habr.com/ru/post/1696895/


All Articles