efcore
efcore copied to clipboard
Improvements to model building and conventions
This an "epic" issue for the theme of improving model building conventions. Specific pieces of work will be tracked by linked issues.
Done in 6.0
- [x] Pre-convention model configuration #12229
- [x] Mechanism/API to specify a default conversion for any property of a given type in the model #10784
- [x] Support Ignore() for non entity type candidates #3867
- [x] Add overloads of UsingEntity() that take advantage of conventions #21535
- [x] Warn when uniquifying an FK column name #20435
- [x] Uniquify and validate Check Constraint name #18958
Proposed for 7.0
- [x] Model Definition: Custom conventions #214
- [ ] Move detection of
ColumnAttributeinRelationalTypeMappingInfoto conventions #11124 - [ ] Uniquify and validate FK, Key and index names across tables #23144
- [x]
KeyAttributesupport for composite primary key #11003 - [ ] Allow value converters to change nullability of columns #24685
- [x] Compiled model: Generate custom lazy loading and change tracking proxy types. #24902
Backlog
- [ ] Add a hook to avoid triggering conventions for provider annotations #19806
- [ ] Add support for default value conventions #9329
- [ ] Use layering to make conventions more robust #15898
- [ ] Add .Builder to Metadata API #15258
- [ ] Add an API consistency test for conventions #20275
- [ ] Allow to specify dependencies in
IEntityTypeConfiguration#22035 - [ ] Make
ICSharpRuntimeAnnotationCodeGeneratorlanguage-agnostic #25110 - [ ] Perf bottleneck because of
SortedDictionaryinAnnotatable.FindAnnotation#25488 - [ ] Perf: Reduce the number of convention executions #15897
- [ ] Store value generator types/factories in the the model and remove the selector #25926
- [ ] Add navigation configuration overloads for shared type entity types #23255
- [ ] Determine how to look up join entity types at model building time #21901
- [ ] Consider moving log messages/warnings for requiredness of navigation properties to model validation #15539
- [ ] Conventions should honor
[MetadataType]#14544 - [ ] Consider alternate property discovery convention(s) #4356
- [ ] Add sugar to allow opt-in mapping for properties/relationships/etc. #16009
- [ ] Model building API: additional configurability of the default conversion for any property of a given type #20418
- [ ] Model Definition: Bulk configuration using Fluent API #9117
- [ ] Support single configuration for all uses of an owned type, shared type, or some arbitrary base class/interface #6787
- [ ] Log a warning with using a non-nullable property by convention for an explicitly optional FK #19958
- [ ] Consider discovering the compiled model automatically instead of requiring
UseModel, by using assembly-level attribute (#24893) - [ ] Consider adding a MsBuild task to generate the model at build-time (#24894)
- [ ] Remove
IRuntime*interfaces #24895 - [ ] Generate compiled relational model #24896
- [ ] Compiled model: Generate code for query filters when possible. #24897
- [ ] Compiled model: Generate constructor bindings #24898
- [ ] Compiled model: Generate code that builds the model lazily #24899
- [ ] Compiled model: Use static binding instead of reflection for properties and fields #24900
- [ ] Compiled model: Split out the mutable model implementation to a different assembly as it's not needed when using compiled model #24901
- [ ] Compiled model: Generate lambdas used in change tracking #24904
- [ ] Compiled model: Generate code that normally depends on reflection types in the model (Type, MemberInfo, etc.) to avoid all reflection at runtime #24903