Jordan M

My feedback

  1. 138 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)

      We’ll send you updates on this idea

      This feature is at least partially implemented in EF Core 2.1. There is no custom binding but many additional patterns are now supported by convention, including injecting the property values in the constructor, injecting instances of services also in the constructor and on properties.

      Direct mapping to fields was already supported in 1.1.

      Jordan M commented  · 

      Do people realise that you can make the default contructor protected?

      Same goes for properties - you can make the setter protected.

    • 152 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)

        We’ll send you updates on this idea

        Jordan M commented  · 

        I wouldn't have static methods on the entities themselves, this goes against the way the framework is currently designed.

        I would add methods to the DbContext or DbSet<TEntity>, something similar to Keith Barrows suggestion.

      Feedback and Knowledge Base