0
クラスを保存するクラスを指定せずにmongodbデータベースに挿入しようとしていますが、挿入するだけでクラスに保存したくありません。単にそれを挿入する方法はありますか?MongoDB:クラスなしで挿入
コード:このような方法でそれをやろうとし
var collection = _database<Entity>(table);
await collection.InsertOneAsync(new Entity { Name = "Jack" });
イム:
public void InsertRecord(string table, List<string> columns, Dictionary<string, string> parameters)
{
var collection = _database<Entity>(table);
await collection.InsertOneAsync(new Entity { Name = "Jack" });
}
あなたは、エンティティのオブジェクトINSEADを試してみましたか? –