Skip to content

Public service property on a base type fails model validation #23968

@mythjuha

Description

@mythjuha

I'm currently migrating an application from Telerik DataAccess to EF Core. In my project every entity inherits from a base class which has a property 'DbContext'. The DB context uses existing Telerik static classes to get the DbContext of an entity instance without the need to pass it around through your methods as a parameter.

public DbContext DbContext
{
  get
  {
      return Telerik.OpenAccess.OpenAccessContextBase.GetContext(this)
  }
}

Is this possible with EF Core as well?

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions