ADO.NET Using C#® (VS 2013)

This three day, intensive course teaches the essential elements of ADO.NET such that, at the end of the course, the programmer is able to utilize its tremendous database manipulation powers to build effective database applications. The course includes a major case study demonstrating the use of ADO.NET in a realistic setting. It is current to .NET 4.5.1, Visual Studio® 2013 and SQL Server® 2012.

Audience: C# .NET developers needing to communicate with data sources.

Prerequisites: A basic knowledge of SQL and of programming the .NET Framework using C#. The student should also understand the fundamentals of XML. To get full benefit from the examples in the course the student should be able to write simple applications. A working knowledge of SQL Server is also desirable.

Number of Days: 3 days

1. Introduction to ADO.NET PartConfiguration Data Access Technologies System ODBC SystemId as Identity Column OLE DB SystemDetails ActiveX Data Objects (ADO) StatusCode Accessing SQL Server before Relationships ADO.NET Stored Procedure ADO.NET 2. ADO.NET Connections ADO.NET Architecture ADO.NET Block Diagram .NET Data Providers .NET Data Providers Programming with ADO.NET Interfaces Namespaces for .NET Data Providers .NET Namespaces BasicConnect (version 1) Connected Data Access Using Interfaces SQL Express LocalDB IDbConnection Properties SqlLocalDB Utility Connection String Visual Studio Server Explorer SQL Server Connection String Queries OLE DB Connection String SQL Server Management Studio SQL Server Security ADO.NET Class Libraries IDbConnection Methods Connecting to an OLE DB Data Provider BasicConnect (version 2) Using Commands Connection Life Cycle Creating a Command Object BasicConnect (version 3) ExecuteNonQuery Database Application Front-ends Using a Data Reader Connection Pooling Disconnected Datasets Pool Settings for SQL Server Data Adapters Connection Events Buy Computer ADO.NET Exception Handling Model 3. ADO.NET Commands Component Command Objects Part Creating Commands

© ITCourseware, LLC 1 ADO.NET Using C# (VS 2013)

Executing Commands 6. More About DataSets Dynamic Queries Filtering DataSets Parameterized Queries Using a Single DataTable Command Types Multiple Tables Stored Procedures DataSet Architecture Testing the Stored Procedure Schema in the DataSet Testing in Server Explorer Relations Stored Procedures in ADO.NET Navigating a DataSet Batch Queries Using Parent/Child Relation Transactions Inferring Schema 4. DataReaders and Connected Access AddWithKey DataReaders Adding a Primary Key Using a DataReader TableMappings Closing a DataReader Identity Columns IDataRecord Creating a Dataset Manually Type-Safe Accessors Manual DataSet Code GetOrdinal() 7. XML and ADO.NET Null Data ADO.NET and XML Testing for Null Rendering XML from a DataSet ExecuteReader Options XmlWriteMode Returning Multiple Result Sets Reading XML into a DataSet DataReader Multiple Results Sets DataSets and XML Schema Obtaining Schema Information ModelSchema.xsd 5. DataSets and Disconnected Access Reading XML Schema DataSet XmlReadMode DataSet Architecture Writing Data as Attributes Why DataSet? XML Data in DataTables DataSet Components Typed DataSets DataAdapter Table Adapter Data Access Class Using a Typed DataSet Retrieving the Data Synchronizing DataSets and XML Filling a DataSet Using XmlDataDocument Accessing a DataSet Windows Client Code Updating a DataSet Scenario Web Client Code Adding a New Row XML Serialization Searching and Updating a Row Default Constructor Deleting a Row 8. Concurrency and Transactions Row Versions DataSets and Concurrency Row State Handling Concurrency Violations BeginEdit and CancelEdit Pessimistic Concurrency DataTable Events Transactions Updating a Database Programming ADO.NET Transactions Insert Command ADO.NET Transaction Code Update Command Using ADO.NET Transactions Delete Command DataBase Transactions Exception Handling Transaction in Stored Procedure Command Builders Testing the Stored Procedure

© ITCourseware, LLC 2 ADO.NET Using C# (VS 2013)

SQL Server Error 11. Appendix A – Acme Computer Case 9. Additional Features Study AcmePub Database 12. Appendix B – SQL Server 2012 Connected Database Access Express Long Database Operations SQL Server Express Asynchronous Operations SQL Server 2012 Express LocalDB Multiple Active Result Sets AttachDBFileName Bulk Copy Database 10. LINQ and Moving from LocalDB to SQL Server Language Integrated Query (LINQ) 13. Appendix C – Learning Resources LINQ to ADO.NET Bridging Objects and Data Object Relational Designer IntelliSense Basic LINQ Query Operators Obtaining a Data Source Filtering Ordering Aggregation Obtaining Lists and Arrays Deferred Execution Modifying a Data Source Performing Inserts via LINQ to SQL Performing Deletes via LINQ to SQL Performing Updates via LINQ to SQL LINQ to DataSet Using the Typed DataSet ADO.NET Entity Framework Exploring the EDM AcmePub Tables AcmePub Entity Data Model XML Representation of Model Entity Data Model Concepts Conceptual Model Storage Model Mappings Querying the EDM Class Diagram Context Class List of Categories List of Books Entity Framework in a Class Library Data Access Class Library Client Code

© ITCourseware, LLC 3 ADO.NET Using C# (VS 2013)