Use precision/scale facets instead of store type when reverse engineering
Fixes https://github.com/dotnet/efcore/issues/29711
- [x] I've read the guidelines for contributing and seen the walkthrough
- [x] I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
- [x] The code builds and tests pass locally (also verified by our automated build checks)
- [x] Commit messages follow this format:
Summary of the changes
- Detail 1
- Detail 2
Fixes #bugnumber
- [ ] Tests for the changes have been added (for bug fixes / features)
- [x] Code follows the same patterns and style as existing code in this repo
@roji Can you review and give me some suggestions?
It seems to only introduce a space in the store type representation between precision and scale?
@roji Yes, it is because this space causes them to be different
https://github.com/dotnet/efcore/blob/81886272a761df8fafe4970b895b1e1fe35effb8/src/EFCore.Design/Scaffolding/Internal/ScaffoldingTypeMapper.cs#L66
Yes, it is because this space causes them to be different
I don't understand - different from what? #29711 is about something quite different...
Can you tell me a unit test example of reverse engineering? I do a unit test to explain what I do
You can take a look at SqlServerDatabaseModelFactoryTest. For example, the Decimal_numeric_types_have_precision_scale test scaffolds numeric columns with various precision/scale combinations (but please keep this comment in mind).
@roji I've added unit test
@RoderickIveans We appreciate the effort here, but it doesn't seem like what you are implementing is what is described in issue #29711. Perhaps you could describe in your own words what you are trying to do here and then maybe we can find the disconnect?