Skip to content

Access Violation #773

Open
Open
@KC-Cygnia

Description

@KC-Cygnia

When mapping to an Input application crashes with no info when doing a multilevel mapping on EF Classes
[SupplyParameterFromForm] public InputModel Input { get; set; } = new();

public class InputModel : myClass
    {

    }
public class myClass
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public DateTime DateTimeStamp { get; set; } = DateTime.Now;
        public List<Thing>? Things{ get; set; }
    }
public class Thing
    {
        public int Id { get; set; }
        public string ThingName { get; set; }
        public DateTime DateTimeStamp { get; set; } = DateTime.Now;
        public List<AnotherThing>? AnotherThings{ get; set; }
        public myClass myClass { get; set; }
        public int myClassId { get; set; }
        
    }
public class AnotherThing    
{
        public int Id { get; set; }
        public string AnotherThingName { get; set; }
        public DateTime DateTimeStamp { get; set; }
        public Thing Thing { get; set; }
        public int ThingId { get; set; }
    }

Crashes on:

Input = _myClass.Adapt<InputModel>();

Crash error: The program '[53536] MyApp.exe' has exited with code 3221225477 (0xc0000005) 'Access violation'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions