I'm trying to insert into a mongodb database without having to specify a class to save it to, I just want to insert it, I don't want to save any of it to a class. Is there a way to just simply insert it?
Code:
var collection = _database<Entity>(table);
await collection.InsertOneAsync(new Entity { Name = "Jack" });
Im trying to do it in a method like this:
public void InsertRecord(string table, List<string> columns, Dictionary<string, string> parameters)
{
var collection = _database<Entity>(table);
await collection.InsertOneAsync(new Entity { Name = "Jack" });
}