Search code examples
entity-framework-6entity-framework-plusentity-framework-extensions

Which flag we need to set to ensure community version of EF Plus?


With recent changes in Entity Framework Plus, which is now depends on EF Extensions, how can we ensure that developers are using free community functionalities?

I have noticed there are two flags

        EntityFrameworkManager.IsEntityFrameworkPlus
        EntityFrameworkManager.IsCommunity

If we are using EF Plus Community version for EF 6 then which flag we need to set to ensure we are not accidently using Paid features?


Solution

  • To ensure you only use free features, you need this code:

    EntityFrameworkManager.IsCommunity = true
    

    This code is a little bit hidden at the bottom of the download page: https://entityframework-plus.net/download

    EDIT: Answer Comment

    Silly question, but where does one place that setting?

    Any place that's called only once. Here are some recommendations:

    • Web App: Use Application_Start in global.asax
    • WinForm App: Use the main thread method
    • Win Service: Use the OnStart method