-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
The only way to define a range of a type other than int or double is to use the [Range(Type, String, String)] overload.
This raises a couple of questions:
- Should we support non-invariant cultures when generating SQL (not only here, but in other places too), e.g. decimal separators other than point or custom date formats?
- Should we throw more exceptions in case of invalid constraints like this?
So, I can think of a few ways to implement it:
- Let the user type anything in the range, only do a sanity check and pass the text literally to SQL.
- Convert the text to the specified type and then back to string.
- Same as # 2, but only support a few primitive types, to avoid differences in formats among cultures and DBMSes.
Which way should we do it, if at all?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels