This question is locked. New answers and comments are not allowed.
I am trying to map a SQL time column to a TimeSpan field, everything is fine if I try to retrieve the data from the SQL Database and display it, however when I try to Insert or Update an object, the Open Access library throws "Operant type clash: int is incompatible with time...", is there anything I am missing in the fluent model specification, the only thing I am specifying in the fluent model metadata class is the primary key
private
static
MappingConfiguration<T> MapObject<T>(Expression<Func<T,
object
>> mapFunc,
string
tableName)
{
var mapping =
new
MappingConfiguration<T>();
mapping.MapType(mapFunc).ToTable(tableName);
return
mapping;
}
private
static
void
MapDefinedObject(List<MappingConfiguration> configurations)
{
var mapping = MapObject<DefinedObject>(e =>
new
{
Id = e.Id,
//int
Time = e.Time,
//Nullable<TimeSpan>
Day = e.Day,
//Nullable<DateTime>
},
"DefinedObject"
);
previousFireMapping.FieldNamingRules.AddPrefix =
"_"
;
previousFireMapping.FieldNamingRules.CaseMode = CaseChangeModes.Lower;
previousFireMapping.HasProperty(e => e.Id).IsIdentity();
configurations.Add(mapping );
}