Entity Framework 5 column mapping datetime -
this not seem work:
this.property(t => t.mydatetime) .hascolumntype("datetime") .hascolumnname("mydatetime");
looking @ sql profiler update sql string still uses datetime2(7) , uses decimal places. result of rounding differences between datetime2 , datetime.
how can forcefulness entity framework utilize datetime sql type?
thank you!
hascolumntype("datetime")
specifies column type, not temporary parameter types used in sql statements. can't command , it's not necessary. if have .net datetime
in application decimal places filled , want store in datetime
type in sql server value (and can only) stored rounded value. doesn't matter if rounding happens on client side before sql sent database server or if rounding happens on database server itself. result same: rounded stored value loss of precision.
entity-framework-5
No comments:
Post a Comment