Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates new instance of <see cref="MongoDbRepository{T}"/>.
 /// </summary>
 /// <param name="parameters">Repository settings</param>
 public MongoDbRepository(MongoDbRepositorySettings <T> parameters)
 {
     location        = parameters.GetConnectionInfo();
     this.collection = parameters.Collection;
 }