コード例 #1
0
        public virtual void Patch(PricelistExEntity target)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }
            base.Patch(target);
            var priceExEntity = (PricelistExEntity)target;

            priceExEntity.Vendors = Vendors;
        }
コード例 #2
0
        public virtual PricelistExEntity ToModel(Pricelist pricelist)
        {
            if (pricelist == null)
            {
                throw new ArgumentNullException(nameof(pricelist));
            }
            PricelistExEntity priceList = new PricelistExEntity();

            priceList.CreatedDate  = System.DateTime.Now;
            priceList.ModifiedDate = System.DateTime.Now;
            priceList.Id           = pricelist.Id;
            priceList.ModifiedBy   = pricelist.ModifiedBy;
            priceList.Name         = pricelist.Name;
            priceList.Description  = pricelist.Description;
            priceList.Currency     = pricelist.Currency;
            priceList.Vendors      = pricelist.Vendors;

            return(priceList);
        }