Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

association attribute is obsolete #298

Closed
dsoltesz opened this issue Aug 19, 2021 · 3 comments · Fixed by #509 or #513
Closed

association attribute is obsolete #298

dsoltesz opened this issue Aug 19, 2021 · 3 comments · Fixed by #509 or #513

Comments

@dsoltesz
Copy link

generated code will throw hundreds of warnings

warning CS0618: 'AssociationAttribute' is obsolete: 'This attribute is no longer in use and will be ignored if applied.'

@dsoltesz dsoltesz added the bug label Aug 19, 2021
@Daniel-Svensson
Copy link
Member

The code base for both Server and Client have the same issue.
It seems that .Net team unfortunately decided to obsolete the whole attribute just because it is not used på EF core, which is very sad.

My intial ideas to solve these are

  • add temporary fix where warning "CS0618" is disabled in the generated code file (can be done using custom code generation using T4 templates)
  • create a similar attribute "EntityAssociationAttribute" or similar that is used instead,
    • any solution needs to be backwards compatible so that AssociationAttribute on models are discovered

@Daniel-Svensson
Copy link
Member

This is mostly solved by #509

@Daniel-Svensson
Copy link
Member

  • We want to change namespace to "System.ComponentModel.DataAnnotations" before release

@Daniel-Svensson Daniel-Svensson modified the milestones: 6.0, 5.5.0 Jun 11, 2024
@Daniel-Svensson Daniel-Svensson linked a pull request Jun 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment