Пример #1
0
        public virtual ApiPersonResponseModel MapBOToModel(
            BOPerson boPerson)
        {
            var model = new ApiPersonResponseModel();

            model.SetProperties(boPerson.BusinessEntityID, boPerson.AdditionalContactInfo, boPerson.Demographic, boPerson.EmailPromotion, boPerson.FirstName, boPerson.LastName, boPerson.MiddleName, boPerson.ModifiedDate, boPerson.NameStyle, boPerson.PersonType, boPerson.Rowguid, boPerson.Suffix, boPerson.Title);

            return(model);
        }
Пример #2
0
        public virtual BOPerson MapEFToBO(
            Person ef)
        {
            var bo = new BOPerson();

            bo.SetProperties(
                ef.BusinessEntityID,
                ef.AdditionalContactInfo,
                ef.Demographic,
                ef.EmailPromotion,
                ef.FirstName,
                ef.LastName,
                ef.MiddleName,
                ef.ModifiedDate,
                ef.NameStyle,
                ef.PersonType,
                ef.Rowguid,
                ef.Suffix,
                ef.Title);
            return(bo);
        }
Пример #3
0
        public virtual Person MapBOToEF(
            BOPerson bo)
        {
            Person efPerson = new Person();

            efPerson.SetProperties(
                bo.AdditionalContactInfo,
                bo.BusinessEntityID,
                bo.Demographic,
                bo.EmailPromotion,
                bo.FirstName,
                bo.LastName,
                bo.MiddleName,
                bo.ModifiedDate,
                bo.NameStyle,
                bo.PersonType,
                bo.Rowguid,
                bo.Suffix,
                bo.Title);
            return(efPerson);
        }
Пример #4
0
        public virtual BOPerson MapModelToBO(
            int businessEntityID,
            ApiPersonRequestModel model
            )
        {
            BOPerson boPerson = new BOPerson();

            boPerson.SetProperties(
                businessEntityID,
                model.AdditionalContactInfo,
                model.Demographic,
                model.EmailPromotion,
                model.FirstName,
                model.LastName,
                model.MiddleName,
                model.ModifiedDate,
                model.NameStyle,
                model.PersonType,
                model.Rowguid,
                model.Suffix,
                model.Title);
            return(boPerson);
        }