Strongly Typed DataSet Class and XML Schema
The custom medical storage data access layer My.Medical.Storage.DataAccessLayer contains a strongly typed DataSet class (MyDataSet) and an XML schema file (MyDataSet.xsd). These can be found in the Business Entity folder of the My.Medical.Storage.DataAccessLayer project.
These can be easily generated for any database schema. To generate these for tutorial database schema (or any schema) perform the following steps:
- Open Visual Studio
- Create a new Visual C# Class Library project (i.e. My.Medical.Storage.DataAccessLayer)
- Choose Data|Add New Data Source…
- For Choose a Data Source Type select Database, and click Next
- For Choose a Database Model, choose Dataset, and click Next
- For Choose your Data Connection, click the New Connection… button
- For Choose Data Source, choose the appropriate source. For this tutorial, we use Microsoft SQL Server 2008.
- For Add Connection, fill out the appropriate information to connect to MyDicomDb
- Choose to include sensitive data from the connection string.
- For Choose your Database Objects, choose
- MyPatientTable
- MyStudyTable
- MySeriesTable
- MyInstanceTable
- For DataSet name, enter MyDataSet
- Click Finish
- The MyDataSet.xsd appears in your project