diff --git a/src/MapTo/Extensions/CommonSource.cs b/src/MapTo/Extensions/CommonSource.cs index 0689cba..2de8fa6 100644 --- a/src/MapTo/Extensions/CommonSource.cs +++ b/src/MapTo/Extensions/CommonSource.cs @@ -92,7 +92,7 @@ namespace MapTo.Extensions foreach(var prop in properties) { - if (prop.FullyQualifiedType.ToString() == property.FullyQualifiedType.ToString()) return true; + if (prop.Name == property.Name) return true; } return false; diff --git a/test/TestConsoleApp/Data/FinanceTransactionReadDto.cs b/test/TestConsoleApp/Data/FinanceTransactionReadDto.cs index 02e47b2..bfb5a24 100644 --- a/test/TestConsoleApp/Data/FinanceTransactionReadDto.cs +++ b/test/TestConsoleApp/Data/FinanceTransactionReadDto.cs @@ -16,5 +16,7 @@ namespace BlueWest.Data public double Quantity { get; } // Bought public double Fee { get; } public DateTime DateTime { get; } + + public string ReadData { get; } } } diff --git a/test/TestConsoleApp/Data/User.cs b/test/TestConsoleApp/Data/User.cs index 6bd9905..2a1bbd8 100644 --- a/test/TestConsoleApp/Data/User.cs +++ b/test/TestConsoleApp/Data/User.cs @@ -6,7 +6,7 @@ using MapTo; namespace BlueWest.Data { [MapFrom(typeof(UserUpdateDto))] - public partial struct User + public partial class User { public int Id { get; } public string Name { get; set; }