Hi,
Actually you can add additional attributes to an entity, field, etc. Do this:
- Go to Project -> Settings -> CodeGeneration -> Additional Attributes
- In Element Type select 'NormalField'
- Add an attribute, put Key in attribute definition
- Put a rule that says that it should be emitted when the field is part of the primary key. (I attached a couple of screenshots.
Then it should emit the attribute when you re-generate code:
[Key]
public System.Int32 OrderId { get; set;}
Attachments
Filename |
File size |
Added on |
Approval |
customAttribute.PNG
|
46,113 |
26-May-2017 07:24.23 |
Approved |