blazor-workshop
blazor-workshop copied to clipboard
System.NotSupportedException: SQLite cannot order by expressions of type 'TimeSpan'
It seems to be similar to #142. The same issue with TimeSpan format.
Probable solution: to store TimeSpan as long:
TimeSpan myTimeSpan = new TimeSpan(10, 10, 10);
long valueToBeStoredInDb = myTimeSpan.Ticks;
System.NotSupportedException: SQLite cannot order by expressions of type 'TimeSpan'. Convert the values to a supported type or use LINQ to Objects to order the results. at Microsoft.EntityFrameworkCore.Sqlite.Query.Internal.SqliteQueryableMethodTranslatingExpressionVisitor.TranslateOrderBy(ShapedQueryExpression source, LambdaExpression keySelector, Boolean ascending) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)