コード例 #1
0
 public static IRepository <T> Factory <T>(MongoDbRepositorySettings <T> parameters) where T : IBrowsableDataObject
 {
     try
     {
         return(new MongoDbRepository <T>(parameters));
     }
     catch (Exception ex)
     {
         throw new Exception($"Creation of MongoDb repository failed. Check number, type and value of parameters. For detail see inner exception.", ex);
     }
 }
コード例 #2
0
 public MongoDbRepository(MongoDbRepositorySettings <T> parameters)
 {
     location        = parameters.GetConnectionInfo();
     this.collection = parameters.Collection;
 }