From 6ec64c2690808071a2574bdbf9aa0c29191b95a9 Mon Sep 17 00:00:00 2001 From: Luigi6821 <53300194+Luigi6821@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:15:39 +0200 Subject: [PATCH] Ambigous match found - Update BsonMapper.Deserialize.cs Fix the ambigous match found when deserialize list --- LiteDB/Client/Mapper/BsonMapper.Deserialize.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LiteDB/Client/Mapper/BsonMapper.Deserialize.cs b/LiteDB/Client/Mapper/BsonMapper.Deserialize.cs index fd68de9e6..804090823 100644 --- a/LiteDB/Client/Mapper/BsonMapper.Deserialize.cs +++ b/LiteDB/Client/Mapper/BsonMapper.Deserialize.cs @@ -258,7 +258,7 @@ private object DeserializeList(Type type, BsonArray value) } else { - var addMethod = type.GetMethod("Add"); + var addMethod = type.GetMethod("Add", new Type[] { itemType }); foreach (BsonValue item in value) { @@ -317,4 +317,4 @@ private object DeserializeAnonymousType(Type type, BsonDocument value) return obj; } } -} \ No newline at end of file +}