目前,我正在使用C#开发一个应用程序,在该应用程序中我想向MongoDB集合中添加一些数据。我正在尝试将数组添加到Employee对象,但是我正在努力使其正常工作。
当我查看其他帖子时,我遇到了使用BsonDocument的语法,如下所示:
var document = new BsonDocument {
{ "author", "joe" },
{ "comments", new BsonArray {
new BsonDocument { { "author", "jim" }, { "comment", "I disagree" } },
new BsonDocument { { "author", "nancy" }, { "comment", "Good post" } }
}}
Run Code Online (Sandbox Code Playgroud)
我想向Function属性添加数组以添加描述和其他详细信息。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Driver;
using MongoDB.Bson;
using MongoDB.Driver.Core;
namespace Application
{
class Program
{
public class Employee
{
public ObjectId Id { get; set; }
public string …Run Code Online (Sandbox Code Playgroud) 我正在使用bootstrap 4并尝试创建这种形状的图像:
整个正方形是我的形象,但我想切掉红色部分或使其透明,以便看到背景颜色.
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
<img src="path/to/image" class="img-fluid" alt="Some text">
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我怎么做到这一点?