Define an ADO.NET entity data model for the customer table
To have a strongly-typed model for accessing the data, you can add an Entity Model to your project in Visual Studio in the following way:
- Create a folder, named Model, under the root of your project.
- Open the context menu of the folder and click Add » New Item...
- In the left pane, under Visual C#, click Data.
- In the center pane, click ADO.NET Entity Data Model.
- In Name input field, enter MembershipModel.edmx and click Add.
The Entity Data Model Wizard window appears.
- Select the EF Designer from database model and click Next.
- Connect to the database you created.
- Add the Customers table from the database to the model and click Finish.
The data model is created and a CustomMembershipProviderEntities
class is created, which is used later on in the sample code.