Database Reference
In-Depth Information
Figure 19-15. Modifying the C-S mapping content section
13. Now save and build the Chapter19 solution, and run the application. When the
PublishCurrency form is open this should populate the TextBox with the
ModifiedDate , Name , and CurrencyCode values, as shown earlier in Figure 19-12.
14. Switch back to the PublishCurrency.cs code with the foreach loop, as shown
in Listing 19-2. You should still see the same column names being shown in
the TextBox with the EntityContainer as cr.ModifiedDate and cr.Name , even
though you have modified the column names in the AdventureWorks
database's Sales.Currency table. But by taking advantage of the schema
abstraction feature of the Entity Data Model, you only have to specify the
updated column names in the XML mapping file under the SSDL content and
C-S mapping content sections.
Summary
In this chapter, you looked at ADO.NET 5.0 Entity Data Model feature.
You also learned how schema abstraction works and how it will help you to achieve loose coupling
between a database and the data access code or data access layer. In the next chapter, you will learn how
to use SQL CLR objects.
 
Search WWH ::




Custom Search