示例#1
0
        public void Update(CustomerEntity customer)
        {
            var filter = Builders <CustomerEntity> .Filter.Where(_ => _.Id == customer.Id);

            _db.GetCollection <CustomerEntity>(_customerCollection).ReplaceOne(filter, customer);
        }
示例#2
0
 public void Create(CustomerEntity customer)
 {
     _db.GetCollection <CustomerEntity>(_customerCollection).InsertOne(customer);
 }