Closed ma499 closed 8 years ago
It seems it doesn't work, I thought it should since the DbType enum is just a bunch of numbers under the hood... Looks like that'll have to be removed although it might be that no-one else has ever tried to use it.
The DbType is inferred from the property type anyway so you'd only actually need to set it under weird circumstances. You can see the default mapping here the default for DateTime will change to DbType.DateTime2 in MicroLite 6.3
Yes, I'm doing something wierd :) I have a my model class using a custom type that has an implicit operator conversion to/from DateTime (and internally stores a private DateTime)... (The type is serialisable to a special format.)
Shall try the TypeConvertor approach.
I'm trying to take advantage of the feature #364 which allows configuration of DBType using a column attribute.
It doesn't seem to work. When I write something like this:
[Column("table_datefrom", DbType.DateTime)]
I get the following compilation error:
An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
How is this supposed to work? Apologies if I've missed something in the documentation.