Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 561 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 561 Bytes

MongoDB adapter for DartORM.

https://github.com/ustims/DartORM

Usage example

import 'package:dart_orm/dart_orm.dart' as ORM;
import 'package:dart_orm_adapter_mongodb/dart_orm_adapter_mongodb.dart';

...

String mongoUser = 'dart_orm_test_user';
String mongoPass = 'dart_orm_test_user';
String mongoDBName = 'dart_orm_test';

MongoDBAdapter mongoAdapter = new MongoDBAdapter(
  'mongodb://$mongoUser:$mongoPass@127.0.0.1/$mongoDBName');
await mongoAdapter.connect();

ORM.Model.ormAdapter = mongoAdapter;