Пример #1
0
        public static TDestination MapObject(TSource entity)
        {
            TDestination dentity = EntityAssembler <TSource, TDestination> .MapObject(entity);

            dentity.SetResponse(entity.Response);
            return(dentity);
        }
Пример #2
0
        public static List <TDestination> MapList(List <TSource> entities)
        {
            List <TDestination> dentityList = new List <TDestination>();

            foreach (var entity in entities)
            {
                TDestination dentity = EntityAssembler <TSource, TDestination> .MapObject(entity);

                dentity.SetResponse(entity.Response);
                dentityList.Add(dentity);
            }
            return(dentityList);
        }
Пример #3
0
        public static void MapObject(TSource entity, TDestination destination)
        {
            EntityAssembler <TSource, TDestination> .MapObject(entity, destination);

            destination.SetResponse(entity.Response);
        }