public PCExpertModel CreateRandomData(PersistenceWorkplace workplace) { Contract.Requires(workplace != null); var slotsToInsert = CreateSlots(); var characteristics = CreateCharacteristics(); var componentsToInsert = CreateComponents(slotsToInsert, characteristics); var configurations = CreateConfigurations(componentsToInsert); workplace.Insert <ComponentCharacteristic>(characteristics); workplace.Insert <ComponentInterface>(slotsToInsert); workplace.Insert <PCComponent>(componentsToInsert); workplace.Insert <PCConfiguration>(configurations); return(new PCExpertModel { Components = componentsToInsert, Interfaces = slotsToInsert, Configurations = configurations, Characteristics = characteristics }); }
protected override IComponentInterfaceRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace) { return(new ComponentInterfaceRepository(workplace)); }
public PCConfigurationRepository(PersistenceWorkplace workplace) { _workplace = workplace; }
protected abstract TRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace);
public PCComponentRepository(PersistenceWorkplace workplace) { _workplace = workplace; }
public ComponentInterfaceRepository(PersistenceWorkplace workplace) { _workplace = workplace; }
protected override IPCConfigurationRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace) { return(new PCConfigurationRepository(workplace)); }
protected override PCComponentRepository CreateRepositoryWithWorkplace(PersistenceWorkplace workplace) { return(new PCComponentRepository(workplace)); }