Skip to content

EFOptimizeContext: add support for partial implementations #34988

Open
@andygjp

Description

I created a repo to demonstrate the problem: https://github.com/andygjp/CompiledModelsInOtherProject

One project is a console app that contains a data context. Another project is a library that contains a data context and it has the <EFStartupProject>..\App\App.csproj</EFStartupProject> property set to a console project. Both data contexts are configured the same.

The compiled model is generated as expected when I use version 9.0.0-preview.4.24205.3, but the compiled model is not generated when I change it to 9.0.0-rc.2.24474.1, regardless if the data context and "app" are in the same project.

I can tell if the auto-compiled model is missing when the console log contains the following message:

CoreEventId.ShadowPropertyCreated[10600] (Microsoft.EntityFrameworkCore.Model.Validation) 
      The property 'Post.BlogId' was created in shadow state because there are no eligible CLR members with a matching name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions