Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Partial classes being deleted on regeneration #318

@Relki

Description

@Relki

Discussed in #317

Originally posted by Relki July 21, 2022
I'm adding partial classes to the generated Context file. I've tried putting the partial class in the same folder as the generated class. I've tried putting it in a different folder, but adjacent. But, when I regenerate the designer code from the EF designer, it regenerates the generated code, but then deletes my custom partial context class. The only way I've been able to have the partial context class not be deleted, is to put it in the root of the project level. Then it doesn't get deleted by the code generator. Any clues as to what I'm doing wrong? Is this a bug?

Generate code deletes the AccountModelContext.Encrypted.cs file in both these scenarios.
image
image

But doesn't delete it in this scenario.
image

Generated code:
image

My Partial class for the same context;
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingLooking into thisneed infoNeed more information to track this down

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions