public void TagSourcefile(SourcefileViewModel sourcefile) { RepositoryViewModel repository = GetRepositoryById(sourcefile.RepositoryId); _commandSender.Send(new TagSourcefile(repository.Id, sourcefile.Name, NewTag, repository.Version)); var tags = _readModel.GetTagsBySourcefile(repository.Id, sourcefile.Name); sourcefile.AddTags(tags); }
void Initialize() { var repositories = _readModel.GetAllRepositories().ToList(); foreach (RepositoryListDto currentRepository in repositories) { RepositoryViewModel newRepositoryViewModel = _repositoryFactory(currentRepository); _repositories.Add(newRepositoryViewModel); } }