tailieunhanh - Microsoft ADO .NET 4 Step by Step - p 27
Nếu không đã có sẵn trong Visual Studio của môi trường phát triển tích hợp (IDE), truy cập các bản đồ chi tiết của bảng điều khiển bằng cách kích chuột bề mặt thiết kế trực quan của mô hình và chọn Chi tiết bản đồ từ menu chuột phải. | 236 Microsoft 4 Step by Step If not already available in your Visual Studio Integrated Development Environment IDE access the Mapping Details panel by right-clicking the model s visual design surface and selecting Mapping Details from the shortcut menu. To use the Mapping Details panel select an entity from the visual design surface. The panel displays all column mappings already defined for the entity with storage model properties on the left half and conceptual model properties to their right. To modify the conceptual property for a storage model property click in the Value Property column to the right of the storage model property name and use its drop-down list to select a different conceptual model property. Chapter 14 Visualizing Data Models 237 The Mapping Details panel lets you link properties from multiple storage layer entities that is from multiple tables views or table-emitting stored procedures from the target database to a single conceptual model entity. With an entity still selected on the visual design surface click the ghosted Add A Table Or View row in the Mapping Details panel. Select one of the available entities from the drop-down list. After the new storage layer properties appear in the panel modify each property as needed to define the proper data relationships. By selecting an association within the visual designer surface the Mapping Details panel will also let you modify the mapped settings for that association. Note This ability to edit the association mapping does not apply to associations tied to imported foreign key relationships. Another useful feature of the Mapping Details panel is the ability to define conditions for mapped entities. For example you might want to limit the loaded orders for a customer to just those that have not yet been shipped. By adding a condition to the OrderEntry entity that looks for non-NULL values in the ShipDate property the Entity Framework will automatically limit the orders managed by the .
đang nạp các trang xem trước