Пример #1
0
        public void ShouldMapZeroToAnEntityNullableNonEntityIdMember()
        {
            var source = new CategoryDto {
                Name = "Root Category", ParentId = 0, TopProductIdentifier = 0
            };
            var result = source.Map().ToANew <CategoryEntity>();

            result.ParentId.ShouldBeNull();
            result.TopProductIdentifier.ShouldBe(0);
        }
Пример #2
0
 public static Category BuildCategory(CategoryDto categoryDto) => categoryDto.Map <CategoryDto, Category>();