efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Configuring multiple properties (like decimal(18,2)) for all dbcontext

Open zahik opened this issue 9 years ago • 3 comments

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?

zahik avatar May 08 '17 16:05 zahik

See my answer on StackOverflow.

bricelam avatar May 08 '17 17:05 bricelam

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 avatar May 08 '17 17:05 zahik

@zahik Custom conventions would be the other way to do this, when implemented. This is being tracked by #214

ajcvickers avatar May 15 '17 16:05 ajcvickers