public static SystemNewsLocalizedDto FromEntityToDto(SystemNewsLocalizedEntity source) { SystemNewsLocalizedDto target = new SystemNewsLocalizedDto(); target.Header = source.Header; target.Id = source.Id; target.Language = source.Language; target.NewsContentText = source.NewsContentText; target.SystemNewsId = source.SystemNewsId; return(target); }
public static SystemNewsLocalized FromDtoToDomainObject(SystemNewsLocalizedDto source) { SystemNewsLocalized target = new SystemNewsLocalized(); target.Header = source.Header; target.Id = source.Id; target.Language = source.Language; target.NewsContentText = source.NewsContentText; target.SystemNewsId = source.SystemNewsId; return(target); }
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); }
public static SystemNewsDto FromDomainObjectToDto(SystemNews source) { SystemNewsDto target = new SystemNewsDto(); target.Id = source.Id; target.DatePublished = source.DatePublished; target.IsBlocked = source.IsBlocked; IList <SystemNewsLocalizedDto> list = new List <SystemNewsLocalizedDto>(); foreach (SystemNewsLocalized newsLocalized in source.SystemNewsLocalized) { SystemNewsLocalizedDto snld = SystemNewsLocalizedAssembler.FromDomainObjectToDto(newsLocalized); list.Add(snld); } target.SystemNewsLocalized = list.ToArray(); return(target); }