public void Update(CustomerEntity customer) { var filter = Builders <CustomerEntity> .Filter.Where(_ => _.Id == customer.Id); _db.GetCollection <CustomerEntity>(_customerCollection).ReplaceOne(filter, customer); }
public void Create(CustomerEntity customer) { _db.GetCollection <CustomerEntity>(_customerCollection).InsertOne(customer); }