efcore
efcore copied to clipboard
Configuring multiple properties (like decimal(18,2)) for all dbcontext
Is this option exist in EF core? (was on EF6)
modelBuilder.Properties<decimal>().Configure(c => c.HasPrecision(18, 3));
here you can configure type of properties to whole context. can it done on EF core?
See my answer on StackOverflow.
Thanks @bricelam ! I thought of somthing with linq magic, and started to break my head. Thank you for the quick answer! (But maybe consider to insert the simple option was on EF6 to here also...no?)
@zahik Custom conventions would be the other way to do this, when implemented. This is being tracked by #214