Esempio n. 1
0
        public virtual ApiAddressResponseModel MapBOToModel(
            BOAddress boAddress)
        {
            var model = new ApiAddressResponseModel();

            model.SetProperties(boAddress.AddressID, boAddress.AddressLine1, boAddress.AddressLine2, boAddress.City, boAddress.ModifiedDate, boAddress.PostalCode, boAddress.Rowguid, boAddress.StateProvinceID);

            return(model);
        }
        public virtual BOAddress MapEFToBO(
            Address ef)
        {
            var bo = new BOAddress();

            bo.SetProperties(
                ef.AddressID,
                ef.AddressLine1,
                ef.AddressLine2,
                ef.City,
                ef.ModifiedDate,
                ef.PostalCode,
                ef.Rowguid,
                ef.StateProvinceID);
            return(bo);
        }
        public virtual Address MapBOToEF(
            BOAddress bo)
        {
            Address efAddress = new Address();

            efAddress.SetProperties(
                bo.AddressID,
                bo.AddressLine1,
                bo.AddressLine2,
                bo.City,
                bo.ModifiedDate,
                bo.PostalCode,
                bo.Rowguid,
                bo.StateProvinceID);
            return(efAddress);
        }
Esempio n. 4
0
        public virtual BOAddress MapModelToBO(
            int addressID,
            ApiAddressRequestModel model
            )
        {
            BOAddress boAddress = new BOAddress();

            boAddress.SetProperties(
                addressID,
                model.AddressLine1,
                model.AddressLine2,
                model.City,
                model.ModifiedDate,
                model.PostalCode,
                model.Rowguid,
                model.StateProvinceID);
            return(boAddress);
        }