예제 #1
0
        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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #4
0
        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);
        }