private async Task UpdateSection(SectionDetailsRecord section) { var collection = _mongoDb.GetCollection <SectionDetailsRecord>("sections"); var filter = Builders <SectionDetailsRecord> .Filter.Eq(x => x.Id, section.Id); var result = await collection.ReplaceOneAsync(filter, section); }
private async Task SaveSection(SectionDetailsRecord section) { var collection = _mongoDb.GetCollection <SectionDetailsRecord>("sections"); await collection.InsertOneAsync(section); }