public TH CreateRepositoryByConnStr <T, TH>(string ConnStr) where T : Entity where TH : IRepository <T> { var contextObj = BuildDBContext.CreateJyDBContext(ConnStr, _SDBSettings.Value.dbType); var repositoryContext = getRepositoryContext(contextObj); return(_createRepository.Get <TH>(new object[] { repositoryContext })); }
public TH CreateDefaultRepository <T, TH>() where TH : IRepository <T> where T : Entity { var contextObj = BuildDBContext.CreateJyDBContext(_SDBSettings.Value.defaultConnectionString, _SDBSettings.Value.dbType); var repositoryContext = getRepositoryContext(contextObj); return(_createRepository.Get <TH>(new object[] { repositoryContext })); }
//得到所有分库的Repository public List <TH> CreateAllRepository <T, TH>() where T : Entity where TH : IRepository <T> { var contextList = BuildDBContext.CreateAllJyDBContext(_SDBSettings.Value.connectionList, _SDBSettings.Value.defaultConnectionString, _SDBSettings.Value.dbType); List <TH> rlist = new List <TH>(); contextList.ForEach((contextObj) => { var repositoryContext = getRepositoryContext(contextObj); rlist.Add(_createRepository.Get <TH>(new object[] { repositoryContext })); }); return(rlist); }
private JyDBReadContext getReadContext(string Id) { return(BuildDBContext.CreateJyDBReadContextFromId(Id, _SDBSettings.Value.connectionKeyList, _SDBSettings.Value.connectionReadList, _SDBSettings.Value.defaultReadConnectionString, _SDBSettings.Value.dbType)); }
public HashSet <string> GetConnectionStrings() { return(BuildDBContext.GetConnectionStrings(_SDBSettings.Value.connectionList, _SDBSettings.Value.defaultConnectionString, _SDBSettings.Value.dbType)); }
private TransactedConnection getContext(string Id) { return(BuildDBContext.CreateJyDBContextFromId(Id, _SDBSettings.Value.connectionKeyList, _SDBSettings.Value.connectionList, _SDBSettings.Value.defaultConnectionString, _SDBSettings.Value.dbType)); }
public OctopusController(BuildDBContext buildDBContext) { _buildDBContext = buildDBContext; }
public BitbucketService(BuildDBContext buildDBContext) { _buildDBContext = buildDBContext; }
public GithubService(BuildDBContext buildDBContext) { _buildDBContext = buildDBContext; }