public virtual BOSalesOrderHeader MapEFToBO(
            SalesOrderHeader ef)
        {
            var bo = new BOSalesOrderHeader();

            bo.SetProperties(
                ef.SalesOrderID,
                ef.AccountNumber,
                ef.BillToAddressID,
                ef.Comment,
                ef.CreditCardApprovalCode,
                ef.CreditCardID,
                ef.CurrencyRateID,
                ef.CustomerID,
                ef.DueDate,
                ef.Freight,
                ef.ModifiedDate,
                ef.OnlineOrderFlag,
                ef.OrderDate,
                ef.PurchaseOrderNumber,
                ef.RevisionNumber,
                ef.Rowguid,
                ef.SalesOrderNumber,
                ef.SalesPersonID,
                ef.ShipDate,
                ef.ShipMethodID,
                ef.ShipToAddressID,
                ef.Status,
                ef.SubTotal,
                ef.TaxAmt,
                ef.TerritoryID,
                ef.TotalDue);
            return(bo);
        }
        public virtual SalesOrderHeader MapBOToEF(
            BOSalesOrderHeader bo)
        {
            SalesOrderHeader efSalesOrderHeader = new SalesOrderHeader();

            efSalesOrderHeader.SetProperties(
                bo.AccountNumber,
                bo.BillToAddressID,
                bo.Comment,
                bo.CreditCardApprovalCode,
                bo.CreditCardID,
                bo.CurrencyRateID,
                bo.CustomerID,
                bo.DueDate,
                bo.Freight,
                bo.ModifiedDate,
                bo.OnlineOrderFlag,
                bo.OrderDate,
                bo.PurchaseOrderNumber,
                bo.RevisionNumber,
                bo.Rowguid,
                bo.SalesOrderID,
                bo.SalesOrderNumber,
                bo.SalesPersonID,
                bo.ShipDate,
                bo.ShipMethodID,
                bo.ShipToAddressID,
                bo.Status,
                bo.SubTotal,
                bo.TaxAmt,
                bo.TerritoryID,
                bo.TotalDue);
            return(efSalesOrderHeader);
        }
        public virtual ApiSalesOrderHeaderResponseModel MapBOToModel(
            BOSalesOrderHeader boSalesOrderHeader)
        {
            var model = new ApiSalesOrderHeaderResponseModel();

            model.SetProperties(boSalesOrderHeader.SalesOrderID, boSalesOrderHeader.AccountNumber, boSalesOrderHeader.BillToAddressID, boSalesOrderHeader.Comment, boSalesOrderHeader.CreditCardApprovalCode, boSalesOrderHeader.CreditCardID, boSalesOrderHeader.CurrencyRateID, boSalesOrderHeader.CustomerID, boSalesOrderHeader.DueDate, boSalesOrderHeader.Freight, boSalesOrderHeader.ModifiedDate, boSalesOrderHeader.OnlineOrderFlag, boSalesOrderHeader.OrderDate, boSalesOrderHeader.PurchaseOrderNumber, boSalesOrderHeader.RevisionNumber, boSalesOrderHeader.Rowguid, boSalesOrderHeader.SalesOrderNumber, boSalesOrderHeader.SalesPersonID, boSalesOrderHeader.ShipDate, boSalesOrderHeader.ShipMethodID, boSalesOrderHeader.ShipToAddressID, boSalesOrderHeader.Status, boSalesOrderHeader.SubTotal, boSalesOrderHeader.TaxAmt, boSalesOrderHeader.TerritoryID, boSalesOrderHeader.TotalDue);

            return(model);
        }
        public virtual BOSalesOrderHeader MapModelToBO(
            int salesOrderID,
            ApiSalesOrderHeaderRequestModel model
            )
        {
            BOSalesOrderHeader boSalesOrderHeader = new BOSalesOrderHeader();

            boSalesOrderHeader.SetProperties(
                salesOrderID,
                model.AccountNumber,
                model.BillToAddressID,
                model.Comment,
                model.CreditCardApprovalCode,
                model.CreditCardID,
                model.CurrencyRateID,
                model.CustomerID,
                model.DueDate,
                model.Freight,
                model.ModifiedDate,
                model.OnlineOrderFlag,
                model.OrderDate,
                model.PurchaseOrderNumber,
                model.RevisionNumber,
                model.Rowguid,
                model.SalesOrderNumber,
                model.SalesPersonID,
                model.ShipDate,
                model.ShipMethodID,
                model.ShipToAddressID,
                model.Status,
                model.SubTotal,
                model.TaxAmt,
                model.TerritoryID,
                model.TotalDue);
            return(boSalesOrderHeader);
        }