0

I executed:

dotnet ef migrations add init -c AppDbContext

The AppDbContext.cs is located in the:

migrations => application folder

but the created migration file 20180105_init.cs is created under the migratins folder directly.

WHY ?

Surely that behavior could be fixed by using this parameter:

--output-dir migrations\application

But that should work out of the box!

HelloWorld
  • 4,671
  • 12
  • 46
  • 78
  • Why should it work out of the box? The EF commands are set to write to the migrations folder. If you want something different, then you have a command line argument to specify that. A golden rule of software development is that you shouldn't make assumptions about what users want, but rather should give them the freedom to do it their own way. That's exactly what they've done here. – Chris Pratt Jan 05 '18 at 14:24
  • When I think about it again, then you are prolly right :-) – HelloWorld Jan 05 '18 at 15:54
  • I guess I thought the files are put where the DbContext lies and not directly put in the migration folder. – HelloWorld Jan 07 '18 at 16:03
  • What are you asking here? Do you face a specific problem? bug reports or improvement suggestions to tools should go the vendor. in this case the GitHub repository https://github.com/aspnet/EntityFrameworkCore – Martin Ullrich Jan 08 '18 at 00:44

0 Answers0