abpframework / abpframework/abp
Consider to remove setters from audit interface properties
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 14.4k
- Forks
- 3.7k
- Avg merge
- 15h 32m
- Merged PRs (30d)
- 106
Description
For example, IHasCreationTime (or ICreationAuditedObject) requires to add a public setter for the CreationTime. However, the creation time should not set later. It is only set when the entity is being created, and generally set by the ABP Framework.
We should consider to remove public setters from these interfaces to let the developer to be able to have private setters. ABP Framework then can use reflection to set them (just like done for the GUID Id properties for entities)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the IHasCreationTime and ICreationAuditedObject interfaces described in the issue, then compare their behavior with the entity identifier handling in framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs. Determine the complete set of affected audit interfaces and verify that the framework can still initialize their values when implementations use private setters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100