You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if this library could also provide fluent mapping APIs to allow mapping of check constraints without using attributes.
Example:
There is no HasMinLength() fluent mapping method. So you have to use a [StringLength(2, MinimumLength = 2)] attribute to get a min length check constraints.
The text was updated successfully, but these errors were encountered:
@cremor the point of this plugin is to provide support for standard .NET plugins which are already there - [StringLength] is part of .NET. If you just want to specify a minimum length check constraint in EF via the Fluent API, you can simply define the check constraint directly via EF's API (docs).
Yes, but with manually written check constraints I also have to manually do all the work that this library is already doing when I use attributes, like:
building the constraint name
using the correct column name
correctly quoting the column name
I like that this library does all that automatically 😄
I'll leave this open in the backlog, but all the above really is trivial stuff - this plugin really was meant for making the built-in .NET attributes work, not making a really simple task even a big simpler :)
It would be great if this library could also provide fluent mapping APIs to allow mapping of check constraints without using attributes.
Example:
There is no
HasMinLength()
fluent mapping method. So you have to use a[StringLength(2, MinimumLength = 2)]
attribute to get a min length check constraints.The text was updated successfully, but these errors were encountered: