|
26 | 26 |
|
27 | 27 | In Visual Studio, you can generate data-model types by using the **LINQ to SQL Classes** template or the **ADO.NET Entity Data Model** template. These templates use the Object Relational Designer (O/R Designer) for the LINQ to SQL model, or the ADO.NET Entity Data Model Designer (Entity Designer) for the Entity Framework model.
|
28 | 28 |
|
29 |
| -
|
30 |
| -
|
31 | 29 | ## Examples
|
32 | 30 | The following example shows how to use <xref:System.Web.DynamicData.MetaModel> type to perform the following tasks in order to use automatic scaffolding in an ASP.NET Web site:
|
33 | 31 |
|
34 | 32 | - Get the data model for the default data context.
|
35 |
| -
|
36 | 33 | - Get the data model for a specified data context.
|
37 |
| -
|
38 | 34 | - Evaluate the routing path (determine the URL) for a specified table.
|
39 | 35 |
|
40 | 36 | The example consists of a page and its code-behind file.
|
|
50 | 46 | To compile the example, you need the following:
|
51 | 47 |
|
52 | 48 | - Visual Studio 2010 or Visual Web Developer 2010 Express.
|
53 |
| -
|
54 | 49 | - A Dynamic Data Web site. For more information, see [Walkthrough: Creating a New Dynamic Data Web Site Using Scaffolding](https://msdn.microsoft.com/library/1564aef2-9103-436a-9806-c8ad7abd616a).
|
55 | 50 |
|
56 |
| - See a run-time code example of this feature: [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel). |
57 |
| -
|
58 | 51 | ]]></format>
|
59 | 52 | </remarks>
|
60 | 53 | <exception cref="T:System.InvalidOperationException">Can be thrown by any method if there has been a data context registration error.</exception>
|
|
362 | 355 | ## Remarks
|
363 | 356 | The route is determined by the combination of the table name and action.
|
364 | 357 |
|
365 |
| - [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel&spage=PathModel.aspx) an online example of this feature. |
366 |
| -
|
367 |
| -
|
368 |
| -
|
369 | 358 | ## Examples
|
370 | 359 | The following example shows how to use the <xref:System.Web.DynamicData.MetaModel.GetActionPath%28System.String%2CSystem.String%2CSystem.Object%29> method to evaluate the routing path (determine the URL) for a specified table. For a complete example, see <xref:System.Web.DynamicData.MetaModel>.
|
371 | 360 |
|
|
432 | 421 | ## Remarks
|
433 | 422 | The <xref:System.Web.DynamicData.MetaTable> object that is returned by the overloaded methods contains the metadata information that is associated with the specified table.
|
434 | 423 |
|
435 |
| - [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel&spage=GetTable.aspx) an online example of this feature. |
436 |
| -
|
437 |
| -
|
438 |
| -
|
439 | 424 | ## Examples
|
440 | 425 | The following example shows how to use the <xref:System.Web.DynamicData.MetaModel.GetTable%2A> overloaded methods to perform the following tasks:
|
441 | 426 |
|
442 | 427 | - Get the <xref:System.Web.DynamicData.MetaTable> object for the specified table.
|
443 |
| -
|
444 | 428 | - Access the metadata information that is contained by the <xref:System.Web.DynamicData.MetaTable> object.
|
445 | 429 |
|
446 | 430 | The example consists of a page and its code-behind file.
|
|
485 | 469 | ## Remarks
|
486 | 470 | The name uniquely identifies a table in the data model and is used to generate the related URL for routing.
|
487 | 471 |
|
488 |
| -
|
489 |
| -
|
490 | 472 | ## Examples
|
491 | 473 | The following example shows how to use the <xref:System.Web.DynamicData.MetaModel.GetTable%28System.String%29> method to obtain the metadata for the specified table. For a complete example, see <xref:System.Web.DynamicData.MetaModel.GetTable%2A>.
|
492 | 474 |
|
|
866 | 848 | ## Remarks
|
867 | 849 | The collection contains all the tables in the data model, which includes the tables that are not visible (are not part of Dynamic Data scaffolding).
|
868 | 850 |
|
869 |
| - [Run](https://go.microsoft.com/fwlink/?LinkId=120736&sref=System.Web.DynamicData.MetaModel&spage=TablesMenu.aspx) an online example of this feature. |
870 |
| -
|
871 |
| -
|
872 |
| -
|
873 | 851 | ## Examples
|
874 | 852 | The following example shows how to use the <xref:System.Web.DynamicData.MetaModel.Tables%2A> and <xref:System.Web.DynamicData.MetaModel.VisibleTables%2A> properties to perform the following tasks:
|
875 | 853 |
|
876 | 854 | - Get a collection of all the tables in a data model and show them in a `GridView` control.
|
877 |
| -
|
878 | 855 | - Get a collection of the visible tables in a data model and show them in a `GridView` control.
|
879 | 856 |
|
880 | 857 | The example consists of a page and its code-behind file.
|
|
0 commit comments