This project has moved and is read-only. For the latest updates, please go here.

EntityFramework 6.0.1 + Migrations

Dec 9, 2013 at 4:51 PM

I'm trying to use effort with code first & migrations enabled. The Effort.DbConnectionFactory.CreateTransient() works, but adding a new entity this is the thrown exception
System.InvalidOperationException: Migrations is enabled for context 'RelationalContext' but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables, for example by running the 'Update-Database' command from the Package Manager Console.
Is there any way to use Effort in EF6+Migrations?

Thanks in advance,

bye bye J
Dec 20, 2013 at 3:11 PM
Jan 21, 2014 at 7:52 AM
I am having the exact same problem. Using
does not work from me as I always get a System.NullReferenceException at Effort.Internal.DbManagement.DbExtensions.GetTable(Database database, String name). Any way to get this to work with EF 6+ and migrations?
Jan 21, 2014 at 11:20 AM

I solved moving the Migrations folder to another project (different from the one where the CodeFirst context is defined).

Hope this helps,

bye bye J
Marked as answer by tamasflamich on 1/25/2014 at 2:38 PM