Example #1
0
        public async Task SaveReport(Report report)
        {
            var reportDocument = report.Adapt <ReportDocument>();

            if (reportDocument.Id == ObjectId.Empty)
            {
                await _dbContext.InsertOneAsync(reportDocument);
            }
            else
            {
                await _dbContext.ReplaceOneAsync(reportDocument);
            }
        }