예제 #1
0
        partial void Merge(Bag entity, ItemDTO dto, object state)
        {
            var details = dto.Details;
            if (details == null)
            {
                return;
            }

            if (details.Size.HasValue)
            {
                entity.Size = details.Size.Value;
            }

            if (details.NoSellOrSort.HasValue)
            {
                entity.NoSellOrSort = details.NoSellOrSort.Value;
            }
        }
예제 #2
0
        partial void Merge(Bag entity, ItemDTO dto, object state)
        {
            var bag = dto.Bag;
            if (bag == null)
            {
                return;
            }

            int size;
            if (int.TryParse(bag.Size, out size))
            {
                entity.Size = size;
            }

            int noSellOrSort;
            if (int.TryParse(bag.NoSellOrSort, out noSellOrSort))
            {
                entity.NoSellOrSort = noSellOrSort == 1;
            }
        }