Entity Framework Tutorial(Second Edition)
上QQ阅读APP看书,第一时间看更新

Designing the UserAuthentication database

Before we begin implementing a simple application that shows how data retrieved from the EDM can be consumed, let's take a quick look at the EDM again:

Designing the UserAuthentication database

As you can see in this diagram, our application needs to interact with the CSDL layer. The SSDL layer will connect to the database (the Security database in our example), and the mapping layer will map these two layers so that they can communicate.

The Security database comprises of a list of the following tables:

  • Users: This table contains the user details.
  • UsersAuthentication: This table contains the user authentication details.
  • UserAuthenticationTypes: This table contains user authentication type data. User authentication type can be Windows, Forms, Passport, and Anonymous.
  • UsersLoginHistory: This table contains data related to user login history; that is, the user login history data of the user.
  • UserRoles: This table contains the user role details.
  • Roles: This table contains the role details.
  • Controls: This table contains an entry per control (note that each control is an object).
  • ControlTypes: This table contains the control type data.