Skip to content

Put out a warning if Property attribute is added to non-partial property #118

@thomasclaudiushuber

Description

@thomasclaudiushuber

When you put a Property attribute on a partial property, it will be generated correctly:

[Property]
public partial string? FristName { get; set; }

But when you forget the partial keyword, nothing will be generated, which is correct too:

[Property]
public string? FristName { get; set; }

But in the latter case, there should be a compiler error that tells a developer that the Property attribute can only be set on either a field or a partial property, but not on a regular property like the auto property above

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions