public void Insert(Order order) { try { var collection = MongoDBConnectionFactory <Order> .GetCollection(); collection.InsertOne(order); }catch (Exception ex) { _logger.LogError($"Erro ao tentar inserir um novo pedido. OrderId: {order.OrderId}", ex); throw; } }
public MongoDBSearchService() { mongoContext = MongoDBConnectionFactory.getInstance() .MongoDBFactory; }