ASP.NET Monsters #48: Configuring Entity Framework

Sign in to queue


The patterns used for configuring Entity Framework Core are a little different when compared to previous versions of EF. In today's episode, Dave takes us through the OptionsBuilder pattern and a couple different methods of wiring it up to your DbContext classes.

Related Episodes:



Download this episode

The Discussion

  • User profile image

    Anyway I can place entity framework core in a class library file? Then reference it in other front end projects like or others.

  • User profile image

    @Alex219267: Yeah for sure you can put your EF Core bits in a class library and reference that library in other projects. The only problem with that right now is that the EF migrations tool doesn't work with class libraries. I hope that issue is fixed soon.

  • User profile image
    Thiago Menezes

    There's a workaround to EF migrations tool work with class libraries.
    Just creating a static void Main method in a class.
    Look at this:

Add Your 2 Cents