Due to the actual development, but also the time is relatively tight, so, in the development of the implementation process, there are always some changes to the original plan:
Alumnibookmodel Database Entity Model
This is the primary data entity class, the EF generates a database based on this entity, each member of which is a dbset type, a dataset type, an in-memory table, with nine tables in the database Alumnibookmodel the name of the member, but, if you open the database, It will be found that their table names are the plural of these member names, and this mechanism, which has already been said at the beginning, is no longer spoken here. Let's take a look at its constructor:
public class Alumnibookmodel:dbcontext
{public
Alumnibookmodel ()
: Base ("Abconnection")
{
} Public
dbset<admin> Admin {get; set;}
Public dbset<user> User {get; set;}
Public dbset<userinfo> UserInfo {get; set;}
Public dbset<class> Class {get; set;}
Public dbset<school> School {get; set;}
Alumnibookmodel inherits DbContext, which is the database context class, which wants to be a database type, encapsulates different data, and constructs a parameter abconnection in Web.config
< connectionstrings>
<add name= "abconnection" connectionstring= "Data source=| datadirectory| Alumnibook.sdf "providername=" system.data.sqlserverce.4.0 "/>
</connectionStrings>
ConnectionString database connection string, the database will be based on it at the appropriate time to create a database, details, I introduced the EF when I have said, here is not in detail.
A common data Entity Model Class (table) is described below--userinfo
Username Entity Model Diagram