dotnet / ef6

This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore.

Home Page:https://docs.microsoft.com/ef/ef6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WOW, you're some sneaky criminals with this EF6

Porkechebure opened this issue · comments

Lol, apart from the whole LOT of troubles/bugs/sheaningans I had to do to make correctly work updates between various related entities, some shady stuff actually happened.

I have an old asp.net (aspx) .NET framework 4.5 application that customer dropped me to maintain.
Long story short, I did various migrations (like 20) due to modification asked.
I tried to run my application on prod db to check if it was able to connect to it.
The sole fact that I run application on the prod db screwed up half of the tables applying half baked migrations to it.

Are you insane in the mind or what?
IF I WANT TO APPLY A MIGRATION I DO IT THROUGH VISUAL STUDIO PACKAGE MANAGER CONSOLE MANUALLY OR BY GENERATING SCRIPTS.
YOU SHOULDN'T BE ALLOWED TO UPDATE A DATABASE BY JUST RUNNING AN APPLICATION IN DEBUG MODE FROM VISUAL STUDIO ON A TARGET DB.

Who the heck sane in mind thought for a second that would be a good idea to just trying to run an application against a db launches various hidden under the hood db updates/alters etc etc.

More infuriating than else, is the fact that it just didn't changed the tables, but also dumbly failed to do so and applied a couple of migrations and stopped so it did an half assed update.

What a gigantic pile of bullshit this is.

This goes against any normal common sense guideline any decent junior programmer would ever think of.
This is just criminal and you should delete this VIRUS repository.

I Work in .,NET since 10 years and yet EF manages to baffle and let me down even more every time i'm FORCED to use it.
You aren't programmers, you are dangerous crazy scientists making weird experiments on the skin of poor programmers who have to deal with this mass of spaghetti code because someone else dropped the project on you.

This issue has been closed because EF6 is no longer being actively developed. We are instead focusing on stability of the codebase, which means we will only make changes to address security issues. See the repo README for more information.

So apparently destroying a production db by just doing a deploy it's not a security issue. Ok.

You connected to a production database from your development environment without understanding what you were doing.

If you don't want migrations to happen automatically, you can configure Database.SetInitializer<MyDbContext>(null); (you can explicitly pass new NullDatabaseInitializer<MyDbContect>() if you prefer.)
(https://learn.microsoft.com/en-us/dotnet/api/system.data.entity.nulldatabaseinitializer-1?view=entity-framework-6.2.0)

It's a behavior that hasn't change in more than 10 years, and it won't for obvious "no breaking changes within a major version" reason, but the behavior has been change in EF Core.