예제 #1
0
        public virtual ApiPetResponseModel MapBOToModel(
            BOPet boPet)
        {
            var model = new ApiPetResponseModel();

            model.SetProperties(boPet.Id, boPet.BreedId, boPet.ClientId, boPet.Name, boPet.Weight);

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

            bo.SetProperties(
                ef.Id,
                ef.BreedId,
                ef.ClientId,
                ef.Name,
                ef.Weight);
            return(bo);
        }
예제 #3
0
        public virtual Pet MapBOToEF(
            BOPet bo)
        {
            Pet efPet = new Pet();

            efPet.SetProperties(
                bo.BreedId,
                bo.ClientId,
                bo.Id,
                bo.Name,
                bo.Weight);
            return(efPet);
        }
예제 #4
0
        public virtual BOPet MapModelToBO(
            int id,
            ApiPetRequestModel model
            )
        {
            BOPet boPet = new BOPet();

            boPet.SetProperties(
                id,
                model.BreedId,
                model.ClientId,
                model.Name,
                model.Weight);
            return(boPet);
        }