Source/MongoDB/a_mongo_db_instance.cs
/// <summary>
/// Imports the contents of a file to a collection, dropping the existing collection if it exists.
/// </summary>
/// <param name="fileName">File to read for input.</param>
/// <param name="collectionName">Name of the collection to populate.</param>
/// <typeparam name="T">Type of the document.</typeparam>
Imports the contents of a file to a collection, dropping the existing collection if it exists.
Imports the contents of a file to a collection dropping the existing collection if it exists .
protected static void Import<T>(string fileName, string collectionName = null)
        {
            var collection = collectionName ?? typeof(T).FullName;
            runner.Import(database_name, collection, fileName, true);
        }
protected static void Import < T > ( string fileName , string collectionName = null ) { var collection = collectionName ?? typeof ( T ) . FullName ; runner . Import ( database_name , collection , fileName , true ) ; }
Imports the contents of a file to a collection, dropping the existing collection if it exists.
Imports the contents of a file to a collection dropping the existing collection if it exists .
fileName
string
File to read for input.
File to read for input .
collectionName
string
Name of the collection to populate.
Name of the collection to populate .
typeparam
Type of the document.
Type of the document .