Skip to content

Mapper fails when type contains DateOnly property #120

@salmanbabri

Description

@salmanbabri

An earlier issue mentioned that DateOnly is not natively supported in this library. So I included the following when configuring my mapper:-

.UseMapping(cfg => { cfg.Options.Primitives.Add(typeof(DateOnly)); })

Then I map dto to model using code:-

var stock = await context.MapAsync<Stock>(vm);

I still get the error:-

ArgumentException: Static property requires null instance, non-static property requires non-null instance. (Parameter 'expression') System.Linq.Expressions.Expression.Property(Expression expression, PropertyInfo property)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions