Beispiel #1
0
        public static externalDTO.Dog MapFromInternal(internalDTO.Dog dog)
        {
            var res = dog == null ? null : new externalDTO.Dog
            {
                Id          = dog.Id,
                DogName     = dog.DogName,
                DateOfBirth = dog.DateOfBirth,
                DateOfDeath = dog.DateOfDeath,
                Sex         = dog.Sex,
                BreedId     = dog.BreedId,
                Breed       = BreedMapper.MapFromInternal(dog.Breed),
                Owner       = dog.Owner,
                AppUserId   = dog.AppUserId
            };

            return(res);
        }
Beispiel #2
0
        public static internalDTO.Dog MapFromDAL(externalDTO.Dog dog)
        {
            var res = dog == null ? null : new internalDTO.Dog
            {
                Id          = dog.Id,
                DogName     = dog.DogName,
                DateOfBirth = dog.DateOfBirth,
                DateOfDeath = dog.DateOfDeath,
                Sex         = new internalDTO.MultiLangString(dog.Sex),
                BreedId     = dog.BreedId,
                Breed       = BreedMapper.MapFromDAL(dog.Breed),
                Owner       = dog.Owner,
                AppUserId   = dog.AppUserId,
            };

            return(res);
        }