public DatabaseInfoDto UpdateDatabaseNames(DatabaseInfoDto dto) { var dbEntity = _repository.Get(dto.Hash); var converter = new DatabaseInfoDtoConverter(); converter.Merge(dbEntity, dto); _persister.Save(); return(converter.ToDto(dbEntity)); }
public IDatabaseInfoRepository CreateTestDatabaseRepositorySubstitute() { IDatabaseInfoRepository repository = Substitute.For <IDatabaseInfoRepository>(); var testDatabase = TestDatabase; repository.GetAll().Returns(new List <DatabaseInfo> { testDatabase }); repository.Get(testDatabase.Hash).Returns(testDatabase); return(repository); }
public DatabaseInfoGroup GetDatabaseInfoGroup(string groupName) { return(_databaseInfoRepository.Get(x => x.Name == groupName)); }