Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Appendix B. Data access fundamentals

Appendix B. Data access fundamentals

Throughout this book, we’ve used Entity Framework to access data stored in a database. Although it’s recommended, Entity Framework isn’t the only choice for retrieving data. A good alternative is to use ADO.NET. Entity Framework itself leverages this component. ADO.NET is easy to use, but you have to manually handle the connection to the database, the command to execute queries, and the transaction to execute multiple update commands. Finally, data isn’t returned as objects but as a generic-purpose container. All these features make ADO.NET simple but extremely code intensive. That’s why Entity Framework is the recommended approach.

Another alternative for managing data is to use XML. Although you can’t use XML as a database in medium to big real-world applications, it’s still perfectly valid for other purposes. It’s a great format for data exchange through messages or files and is perfectly suitable for storing configuration information (the web.config file is an XML file) or small pieces of data. For these reasons, it’s important for you to know about XML.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial