Rajeev Ranjan Rajeev Ranjan - 18 days ago 13
C# Question

Dapper Method not found exception

using (var conn = _config.OpenConnection())
{
var p = new DynamicParameters();
p.Add("@playerName",playerName);


It worked previously in earlier versions well but last dapper version 1.40.0.0 returns strange error :


Result Message: Test method
DupGames.Database.DbAccess.Tests.BlackjackDbTests.SelectNewDealTest
threw exception: System.MissingMethodException: Method not found:
'Void Dapper.DynamicParameters.Add(System.String, System.Object,
System.Nullable
1<System.Data.DbType>,
System.Nullable
1,
System.Nullable
1<Int32>, System.Nullable
1,
System.Nullable`1)'.

Answer

The problem occured due to the version mismatch.

Thanks

Comments