Пример #1
0
        public virtual ApiShoppingCartItemResponseModel MapBOToModel(
            BOShoppingCartItem boShoppingCartItem)
        {
            var model = new ApiShoppingCartItemResponseModel();

            model.SetProperties(boShoppingCartItem.ShoppingCartItemID, boShoppingCartItem.DateCreated, boShoppingCartItem.ModifiedDate, boShoppingCartItem.ProductID, boShoppingCartItem.Quantity, boShoppingCartItem.ShoppingCartID);

            return(model);
        }
        public virtual BOShoppingCartItem MapEFToBO(
            ShoppingCartItem ef)
        {
            var bo = new BOShoppingCartItem();

            bo.SetProperties(
                ef.ShoppingCartItemID,
                ef.DateCreated,
                ef.ModifiedDate,
                ef.ProductID,
                ef.Quantity,
                ef.ShoppingCartID);
            return(bo);
        }
        public virtual ShoppingCartItem MapBOToEF(
            BOShoppingCartItem bo)
        {
            ShoppingCartItem efShoppingCartItem = new ShoppingCartItem();

            efShoppingCartItem.SetProperties(
                bo.DateCreated,
                bo.ModifiedDate,
                bo.ProductID,
                bo.Quantity,
                bo.ShoppingCartID,
                bo.ShoppingCartItemID);
            return(efShoppingCartItem);
        }
Пример #4
0
        public virtual BOShoppingCartItem MapModelToBO(
            int shoppingCartItemID,
            ApiShoppingCartItemRequestModel model
            )
        {
            BOShoppingCartItem boShoppingCartItem = new BOShoppingCartItem();

            boShoppingCartItem.SetProperties(
                shoppingCartItemID,
                model.DateCreated,
                model.ModifiedDate,
                model.ProductID,
                model.Quantity,
                model.ShoppingCartID);
            return(boShoppingCartItem);
        }