This package contains CRUD functions with mongodb driver functions like find that are ready for use for MongoDB .Net Core
public class MyMongoConnection : IMongoConnection
{
public string GetConnectionString()
{
return "mongodb://localhost:27017/exampledb?connectTimeoutMS=60000&socketTimeoutMS=60000&maxIdleTimeMS=60000&minPoolSize=10";
}
public string GetDatabaseName()
{
return "exampledb";
}
}
public class ExampleEntity : MongoContext<ExampleEntity, MyMongoConnection>
{
public string ExampleField { get; set; }
}
ExampleEntity instance = new ExampleEntity(){ });
instance.Insert();
ExampleEntity.Select().ToList();
ExampleEntity.Select().Where(w=> w....).ToList();