示例#1
0
		public void Add(Image img)
		{
			var now = DateTime.Now;
			img.Status = (int)ImgStatus.active;
			img.CreateDate = now;
			img.UpdateDate = now;
			var bsonDoc = img.ToBson();
			var task = _collection.InsertOneAsync(bsonDoc);
			task.Wait();
		}