0

I am new to Firebird database and I have a requirement where I have to integrate Firebird database with Code First Approach in Entity Framework MVC.

This is what I have done so far:

  1. I added the connection string for Firebird database in App.Config
  2. Passing that connection string in DBContext class
  3. When I run update-database -force command in package manager console it creates Test.FDB database for me, but when I open this database, my tables were not created or migrated. I am using AutoMigrationsEnabled=true also.

Can you please provide a sample/example of creating Firebird database with MVC Code First approach and Entity Framework?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
ankit sharma
  • 449
  • 1
  • 6
  • 17

1 Answers1

0

First, check that your model classes are adding in the DBContext file, then you need to run Add-Migration <YourMigrationName> command from Package Manager Console then run Update-Database.

Sample code to add class to DBContext.

public virtual DbSet<YourClassName> YourClassName{ get; set; }

Note: You can try by using AutoMigrationsEnabled=false

You can refer this answer why to use AutoMigrationsEnabled=false.

Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197