Beispiel #1
0
        public virtual ApiProductVendorResponseModel MapBOToModel(
            BOProductVendor boProductVendor)
        {
            var model = new ApiProductVendorResponseModel();

            model.SetProperties(boProductVendor.ProductID, boProductVendor.AverageLeadTime, boProductVendor.BusinessEntityID, boProductVendor.LastReceiptCost, boProductVendor.LastReceiptDate, boProductVendor.MaxOrderQty, boProductVendor.MinOrderQty, boProductVendor.ModifiedDate, boProductVendor.OnOrderQty, boProductVendor.StandardPrice, boProductVendor.UnitMeasureCode);

            return(model);
        }
        public virtual BOProductVendor MapEFToBO(
            ProductVendor ef)
        {
            var bo = new BOProductVendor();

            bo.SetProperties(
                ef.ProductID,
                ef.AverageLeadTime,
                ef.BusinessEntityID,
                ef.LastReceiptCost,
                ef.LastReceiptDate,
                ef.MaxOrderQty,
                ef.MinOrderQty,
                ef.ModifiedDate,
                ef.OnOrderQty,
                ef.StandardPrice,
                ef.UnitMeasureCode);
            return(bo);
        }
        public virtual ProductVendor MapBOToEF(
            BOProductVendor bo)
        {
            ProductVendor efProductVendor = new ProductVendor();

            efProductVendor.SetProperties(
                bo.AverageLeadTime,
                bo.BusinessEntityID,
                bo.LastReceiptCost,
                bo.LastReceiptDate,
                bo.MaxOrderQty,
                bo.MinOrderQty,
                bo.ModifiedDate,
                bo.OnOrderQty,
                bo.ProductID,
                bo.StandardPrice,
                bo.UnitMeasureCode);
            return(efProductVendor);
        }
Beispiel #4
0
        public virtual BOProductVendor MapModelToBO(
            int productID,
            ApiProductVendorRequestModel model
            )
        {
            BOProductVendor boProductVendor = new BOProductVendor();

            boProductVendor.SetProperties(
                productID,
                model.AverageLeadTime,
                model.BusinessEntityID,
                model.LastReceiptCost,
                model.LastReceiptDate,
                model.MaxOrderQty,
                model.MinOrderQty,
                model.ModifiedDate,
                model.OnOrderQty,
                model.StandardPrice,
                model.UnitMeasureCode);
            return(boProductVendor);
        }