5.5. Creating an EDM

If you already have a Windows Forms application that uses Entity Framework, you can just copy model classes to the Models folder. Otherwise, you have to create them from scratch. The process of creating an EDM is described in the previous chapter in the topic Creating an Entity Data Model (EDM).

There is one more small difference: your response to the EDM wizard’s question about how to store the connection string:

fbdevgd30 mvc 007 en

Figure 35. Configuring connection string storage

When we create a web application, all users will work with the database using a single account, so select Yes for this question. Any user with enough privileges can be specified as the username. It is advisable not to use the SYSDBA user because it has more privileges than are required for a web application to work.

You can always change the username in the application when it is ready for testing and deployment, by just editing the connection string in the AppName.exe.conf application configuration file.

The connection string will be stored in the connectionStrings section and will look approximately as follows:

  1. <add name="DbModel"
  2. connectionString="character set=UTF8; data source=localhost;
  3. initial catalog=examples; port number=3050;
  4. user id=sysdba; dialect=3; isolationlevel=Snapshot;
  5. pooling=True; password=masterkey;"
  6. providerName="FirebirdSql.Data.FirebirdClient" />