コード例 #1
0
        public Item ToDomain(Item entity)
        {
            entity = entity ?? new Item();

            entity.Id              = Id.HasValue() ? Id.To <Guid>() : default(Guid);
            entity.Code            = Code;
            entity.Name            = Name;
            entity.Price           = Price;
            entity.QuantityInStock = QuantityInStock;
            entity.Description     = Description;
            entity.AdditionalInfo  = AdditionalInfo.IsNotNull() ? AdditionalInfo.ToDomain() : null;
            entity.Active          = Active.GetValueOrDefault();

            return(entity);
        }