Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dapper Method not found exception

Tags:

c#

dapper

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.Nullable1<System.Data.DbType>, System.Nullable1, System.Nullable1<Int32>, System.Nullable1, System.Nullable`1)'.

like image 281
Rajeev Ranjan Avatar asked Apr 22 '15 11:04

Rajeev Ranjan


1 Answers

For the benefit of others finding this via Google: it's possible that you have a static property in your model. See this bug for details.

like image 77
Roman Starkov Avatar answered Sep 19 '22 17:09

Roman Starkov