henkmollema / Dapper-FluentMap

Provides a simple API to fluently map POCO properties to database columns when using Dapper.
MIT License
429 stars 88 forks source link

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' #127

Closed drma-tech closed 1 year ago

drma-tech commented 4 years ago
public class BadgeMapper : EntityMap<BadgeVM>
    {
        public BadgeMapper()
        {
            Map(p => p.Rank.Level)
                .ToColumn("Rank_Level");
        }
    }

As in my previous ticket, I tried with just one mapping to see if it worked, but it is generating another error.

henkmollema commented 4 years ago

Do you have a full stack trace?

drma-tech commented 4 years ago

There is no stacktrace, as it is an exception generated by the visual studio itself. But this is easy to reproduce, because I believe that the component is not recognizing attributes of another class

jgador commented 3 years ago

I encountered this error when I have nested types in my mapping for CustomPropertyTypeMap. I tried to instantiate the nested type from the constructor, but to no avail.