0

私はこのようなドメインモデルを持っています

public class EntityOne
    {
        public int EnityOneId { get; set; }
        public int EntityOnePropertyOne { get; set; }

        public List<EntityTwo> EntityTwos { get; set; }
    }

    public class EntityTwo
    {
        public int EntityTwoId { get; set; }
        public string EntityTwoPropertyOne { get; set; }

        public int EntityThreeId { get; set; }
        public int EnityOneId { get; set; }

        public virtual EntityOne EntityOne { get; set; }
        public virtual EntityThree EntityThree { get; set; }
    }

    public class EntityThree
    {
        public int EntityThreeId { get; set; }
        public string EntityThreePropertyOne { get; set; }
    }

そして、私はこのようなDTOを持っています

public class EntityDTO
    {
        public int EntityOnePropertyOne { get; set; }
        public string EntityThreePropertyOne_ValueOne { get; set; }
        public string EntityThreePropertyOne_ValueTwo { get; set; }
        public string EntityThreePropertyOne_ValueThree { get; set; }
        public string EntityThreePropertyOne_ValueFour { get; set; }
        public string EntityThreePropertyOne_ValueFive { get; set; }
    }

AutoMapper を使用して DTO から DomainModel へのマッピングとその逆を構成したいのですが、その方法がわかりませんでした...提案やヘルプ

4

1 に答える 1