How to: Create A Model Based on MS SQL 2000 Database
This topic will walk you through the common task of creating a new Telerik Data Access model connected to a MS SQL 2000 database.
To create a new model:
- Open Microsoft Visual Studio 2010 in elevated administrator mode.
- From the File menu, choose New and then Project.
- In the New Project dialog, expand the language of your preference. Select Windows and then select Class Library. Type GettingStartedAzure for a name of your project.
- Integrate the project with the Telerik.DataAccess.Fluent NuGet package.
-
In the App.config file, add a connection string to your database:
<connectionStrings> <add name="connectionId" connectionString="data source=.\sqlexpress; initial catalog=FluentMappingDatabase; integrated security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
Create POCO classes for your persistent entities.
- Using the Fluent Mapping API create the metadatasource class where the mapping is defined. An example is available here.
- Create your context class.
At this point you cat test the model through any application that is integrated with the Telerik.DataAccess.Core NuGet package.