Esempio n. 1
0
 public static void CopyEntityProperties(
     SystemNewsEntity source, SystemNewsEntity target)
 {
     target.DatePublished = source.DatePublished;
     target.Id            = source.Id;
     target.IsBlocked     = source.IsBlocked;
     target.SystemNewsLocalized.Clear();
     foreach (SystemNewsLocalized newsLocalized in source.SystemNewsLocalized)
     {
         SystemNewsLocalized loc = new SystemNewsLocalized();
         SystemNewsLocalizedAssembler.CopyEntityProperties(newsLocalized, loc);
         target.SystemNewsLocalized.Add(loc);
     }
 }
Esempio n. 2
0
        public static SystemNewsEntity FromDtoToEntity(SystemNewsDto source)
        {
            SystemNewsEntity target = new SystemNewsEntity();

            target.Id            = source.Id;
            target.DatePublished = source.DatePublished;
            target.IsBlocked     = source.IsBlocked;
            foreach (SystemNewsLocalizedDto newsLocalized in source.SystemNewsLocalized)
            {
                SystemNewsLocalizedEntity snld =
                    SystemNewsLocalizedAssembler.FromDtoToEntity(newsLocalized);
                target.SystemNewsLocalized.Add(snld);
            }
            return(target);
        }
Esempio n. 3
0
        public static SystemNewsDto FromEntityToDto(SystemNewsEntity source)
        {
            SystemNewsDto target = new SystemNewsDto();

            target.SystemNewsLocalized = new List <SystemNewsLocalizedDto>();
            target.Id            = source.Id;
            target.DatePublished = source.DatePublished;
            target.IsBlocked     = source.IsBlocked;
            foreach (SystemNewsLocalized newsLocalized in source.SystemNewsLocalized)
            {
                SystemNewsLocalizedDto snld =
                    SystemNewsLocalizedAssembler.FromEntityToDto(newsLocalized);
                target.SystemNewsLocalized.Add(snld);
            }
            return(target);
        }