public void Persist(SystemNews item) { VtsWebServiceClient service = new VtsWebServiceClient(); service.NewsPersist(SystemNewsAssembler.FromDomainObjectToDto(item)); service.Close(); }
public static IEnumerable <SystemNews> GetLast(int topCount) { VtsWebServiceClient service = new VtsWebServiceClient(); foreach (SystemNewsDto newsDto in service.NewsGetLast(topCount)) { yield return(SystemNewsAssembler.FromDtoToDomainObject(newsDto)); } service.Close(); }
public IEnumerable <SystemNews> GetAll() { VtsWebServiceClient service = new VtsWebServiceClient(); foreach (SystemNewsDto dto in service.NewsGetAll()) { yield return(SystemNewsAssembler.FromDtoToDomainObject(dto)); } service.Close(); }
public SystemNews Get(long id) { VtsWebServiceClient service = new VtsWebServiceClient(); return(SystemNewsAssembler.FromDtoToDomainObject(service.NewsGet(id))); }