static void Main(string[] args) { IMongoDB service = new MongoDb(); var BillRepository = new BillRepository(service, "Bill"); BillRepository.CreateOrUpdate(new Bill() { Id = 1, CustomerName = "Pepe", Total = 232 }); }