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
The async CRUD methods like GetAsync are sometimes throwing exceptions like below
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The type arguments for method 'System.Threading.Tasks.Task.FromResult<TResult>(TResult)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
at CallSite.Target(Closure , CallSite , Type , Object )
at DapperExtensions.DapperAsyncImplementor.GetAsync[T](IDbConnection connection, Object id, IDbTransaction transaction, Nullable`1 commandTimeout, Boolean buffered, IList`1 colsToSelect, IList`1 includedProperties)
at CallSite.Target(Closure , CallSite , Object )
at DapperExtensions.DapperAsyncExtensions.GetAsync[T](IDbConnection connection, Object id, IDbTransaction transaction, Nullable`1 commandTimeout, Boolean buffered)
at Repository.GetAsync(SqlConnection connection, Guid blueprintId) in myfile.cs:line -1
I assume this happens when there is nothing in the database, and the async method's Task.FromResult have trouble with returning it because it doesn't know what type null is. The type just needs to be added to the Task.FromResult call, it should be a very quick and easy fix.
The methods are in DapperAsyncImplementor.cs
Please and Thanks!
The text was updated successfully, but these errors were encountered:
The async CRUD methods like GetAsync are sometimes throwing exceptions like below
I assume this happens when there is nothing in the database, and the async method's Task.FromResult have trouble with returning it because it doesn't know what type null is. The type just needs to be added to the Task.FromResult call, it should be a very quick and easy fix.
The methods are in DapperAsyncImplementor.cs
Please and Thanks!
The text was updated successfully, but these errors were encountered: