public virtual ApiPetResponseModel MapBOToModel(
            BOPet boPet)
        {
            var model = new ApiPetResponseModel();

            model.SetProperties(boPet.Id, boPet.AcquiredDate, boPet.BreedId, boPet.Description, boPet.PenId, boPet.Price, boPet.SpeciesId);

            return(model);
        }
Beispiel #2
0
        public virtual BOPet MapEFToBO(
            Pet ef)
        {
            var bo = new BOPet();

            bo.SetProperties(
                ef.Id,
                ef.AcquiredDate,
                ef.BreedId,
                ef.Description,
                ef.PenId,
                ef.Price,
                ef.SpeciesId);
            return(bo);
        }
Beispiel #3
0
        public virtual Pet MapBOToEF(
            BOPet bo)
        {
            Pet efPet = new Pet();

            efPet.SetProperties(
                bo.AcquiredDate,
                bo.BreedId,
                bo.Description,
                bo.Id,
                bo.PenId,
                bo.Price,
                bo.SpeciesId);
            return(efPet);
        }
        public virtual BOPet MapModelToBO(
            int id,
            ApiPetRequestModel model
            )
        {
            BOPet boPet = new BOPet();

            boPet.SetProperties(
                id,
                model.AcquiredDate,
                model.BreedId,
                model.Description,
                model.PenId,
                model.Price,
                model.SpeciesId);
            return(boPet);
        }