protected TOtherIndexType GenerateRelatedEntityId <TGeneratingRepositoryTest, TOtherRecordType, TOtherIndexType>() where TGeneratingRepositoryTest : RepositoryBaseTest <TOtherRecordType, TOtherIndexType>, new() where TOtherRecordType : class, IModel <TOtherIndexType> { var generatingRepositoryTest = new TGeneratingRepositoryTest { RepositoriesFactory = RepositoriesFactory }; var testElement = generatingRepositoryTest.CreateTestElement(); var repository = RepositoriesFactory.GetContextSharingRepository <TOtherRecordType, TOtherIndexType, TRecordType, TIndexType>(DataAccess); var output = repository.CreateAsync(testElement).Result; return(output); }
protected IRepository <TOtherRecordType, TOtherIndexType> GetContextSharingRepository <TOtherRecordType, TOtherIndexType>() where TOtherRecordType : class, IModel <TOtherIndexType> { return(RepositoriesFactory.GetContextSharingRepository <TOtherRecordType, TOtherIndexType, TRecordType, TIndexType>(DataAccess)); }