Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Scott Hunter Program Manager Microsoft Corporation PC30.

Similar presentations


Presentation on theme: " Scott Hunter Program Manager Microsoft Corporation PC30."— Presentation transcript:

1  Scott Hunter Program Manager Microsoft Corporation PC30

2

3

4

5 // Global.asax: Application_Start model.RegisterContext (typeof(NorthwindDataContext), new ContextConfiguration() { ScaffoldAllTables = true }); // WARNING: This enables scaffolding for every table in the model. To enable scaffolding on a per-table or per-column basis, you can use attributes on the model: [MetadataType(typeof(ProductMeta))]public partial class ProductMeta [ScaffoldTable(true)]{ public partial class Product [ScaffoldColumn(true)] { public object UnitPrice { get; set; } …} } // WARNING: This enables scaffolding for every table in the model. To enable scaffolding on a per-table or per-column basis, you can use attributes on the model: [MetadataType(typeof(ProductMeta))]public partial class ProductMeta [ScaffoldTable(true)]{ public partial class Product [ScaffoldColumn(true)] { public object UnitPrice { get; set; } …} }

6 // Global.asax: Application_Start RouteTable.Routes.routes.Add (new DynamicDataRoute("{table}/{action}.aspx") { Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }), Model = model }); RouteTable.Routes.routes.Add (new DynamicDataRoute("{table}/List.aspx") { Action = PageAction.List, ViewName = "List", Model = model }); RouteTable.Routes.Add(new DynamicDataRoute("MyCategoryDetail/{CategoryID}") { Model = model, Table = "Categories", Action = "Details" });

7

8 PageTemplatesFieldTemplatesUIHint/DataType on ModelCustomPagesUIHints on DynamicField/DynamicControl

9

10

11

12

13

14

15

16

17

18

19

20

21 Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com

22

23 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

24


Download ppt " Scott Hunter Program Manager Microsoft Corporation PC30."

Similar presentations


Ads by Google