You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dapperextensions: error mapping datetime (DB) to DateTimeOffset (entity); However, dappercontrib mapping is normal.
System.Exception: Invalid cast from 'System.DateTime' to 'System.DateTimeOffset'.: An error occurred while mapping the value '2021/12/17 3:07:00' of type System.DateTime to the member name 'Birthday' of type System.DateTimeOffset on the MultiTenantDemo.Entity.User class.
---> System.InvalidCastException: Invalid cast from 'System.DateTime' to 'System.DateTimeOffset'.
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
at System.DateTime.System.IConvertible.ToType(Type type, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at Slapper.AutoMapper.Configuration.ValueTypeConverter.Convert(Object value, Type type)
at Slapper.AutoMapper.InternalHelpers.ConvertValuesTypeToMembersType(Object value, String memberName, Type memberType, Type classType)
--- End of inner exception stack trace ---
at Slapper.AutoMapper.InternalHelpers.ConvertValuesTypeToMembersType(Object value, String memberName, Type memberType, Type classType)
at Slapper.AutoMapper.InternalHelpers.SetMemberValue(Object member, Object obj, Object value)
at Slapper.AutoMapper.InternalHelpers.Map(IDictionary2 dictionary, Object instance, Object parentInstance) at Slapper.AutoMapper.Map(Type type, IEnumerable1 listOfProperties, Boolean keepCache)
at Slapper.AutoMapper.Map[T](IEnumerable1 listOfProperties, Boolean keepCache) at DapperExtensions.DapperImplementor.MappColumns[T](IEnumerable1 values)
at DapperExtensions.DapperImplementor.GetListAutoMap[T](IDbConnection connection, IList1 colsToSelect, IClassMapper classMap, IPredicate predicate, IList1 sort, IDbTransaction transaction, Nullable1 commandTimeout, Boolean buffered, IList1 includedProperties)
at DapperExtensions.DapperImplementor.InternalGetListAutoMap[T](IDbConnection connection, Object predicate, IList1 sort, IDbTransaction transaction, Nullable1 commandTimeout, Boolean buffered, IList1 colsToSelect, IList1 includedProperties)
at DapperExtensions.DapperAsyncImplementor.InternalGetListAutoMapAsync[T](IDbConnection connection, Object predicate, IList1 sort, IDbTransaction transaction, Nullable1 commandTimeout, Boolean buffered, IList1 colsToSelect, IList1 includedProperties)
at DapperExtensions.DapperAsyncImplementor.GetListAsync[T](IDbConnection connection, Object predicate, IList1 sort, IDbTransaction transaction, Nullable1 commandTimeout, Boolean buffered, IList1 colsToSelect, IList1 includedProperties)
at DapperExtensions.DapperAsyncExtensions.GetListAsync[T](IDbConnection connection, Object predicate, IList1 sort, IDbTransaction transaction, Nullable1 commandTimeout, Boolean buffered)
Where is the custom field mapping function
The text was updated successfully, but these errors were encountered:
Dapperextensions: error mapping datetime (DB) to DateTimeOffset (entity); However, dappercontrib mapping is normal.
System.Exception: Invalid cast from 'System.DateTime' to 'System.DateTimeOffset'.: An error occurred while mapping the value '2021/12/17 3:07:00' of type System.DateTime to the member name 'Birthday' of type System.DateTimeOffset on the MultiTenantDemo.Entity.User class.
---> System.InvalidCastException: Invalid cast from 'System.DateTime' to 'System.DateTimeOffset'.
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
at System.DateTime.System.IConvertible.ToType(Type type, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at Slapper.AutoMapper.Configuration.ValueTypeConverter.Convert(Object value, Type type)
at Slapper.AutoMapper.InternalHelpers.ConvertValuesTypeToMembersType(Object value, String memberName, Type memberType, Type classType)
--- End of inner exception stack trace ---
at Slapper.AutoMapper.InternalHelpers.ConvertValuesTypeToMembersType(Object value, String memberName, Type memberType, Type classType)
at Slapper.AutoMapper.InternalHelpers.SetMemberValue(Object member, Object obj, Object value)
at Slapper.AutoMapper.InternalHelpers.Map(IDictionary
2 dictionary, Object instance, Object parentInstance) at Slapper.AutoMapper.Map(Type type, IEnumerable
1 listOfProperties, Boolean keepCache)at Slapper.AutoMapper.Map[T](IEnumerable
1 listOfProperties, Boolean keepCache) at DapperExtensions.DapperImplementor.MappColumns[T](IEnumerable
1 values)at DapperExtensions.DapperImplementor.GetListAutoMap[T](IDbConnection connection, IList
1 colsToSelect, IClassMapper classMap, IPredicate predicate, IList
1 sort, IDbTransaction transaction, Nullable1 commandTimeout, Boolean buffered, IList
1 includedProperties)at DapperExtensions.DapperImplementor.InternalGetListAutoMap[T](IDbConnection connection, Object predicate, IList
1 sort, IDbTransaction transaction, Nullable
1 commandTimeout, Boolean buffered, IList1 colsToSelect, IList
1 includedProperties)at DapperExtensions.DapperAsyncImplementor.InternalGetListAutoMapAsync[T](IDbConnection connection, Object predicate, IList
1 sort, IDbTransaction transaction, Nullable
1 commandTimeout, Boolean buffered, IList1 colsToSelect, IList
1 includedProperties)at DapperExtensions.DapperAsyncImplementor.GetListAsync[T](IDbConnection connection, Object predicate, IList
1 sort, IDbTransaction transaction, Nullable
1 commandTimeout, Boolean buffered, IList1 colsToSelect, IList
1 includedProperties)at DapperExtensions.DapperAsyncExtensions.GetListAsync[T](IDbConnection connection, Object predicate, IList
1 sort, IDbTransaction transaction, Nullable
1 commandTimeout, Boolean buffered)Where is the custom field mapping function
The text was updated successfully, but these errors were encountered: