Esempio n. 1
0
        public void TestNewInstance()
        {
            using (var database = new CouchDatabase("http://localhost:5984/"))
            {
                var mapping = new ImplicitMapping();
                var policy = new QueryPolicy();

                var provider = new CouchDbQueryProvider(new CouchDbConnection(database), mapping, policy);
                var query = new Query<Car>(provider);
                var queryable = query.Where(x => x.Make == "Audi" && x.HorsePowers == 123);
                var cars = queryable.ToList();
                foreach (var car in cars)
                {
                    car.Model = "Cool";
                }
            }
        }
Esempio n. 2
0
 public QueryTranslator(QueryLanguage language, QueryMapping mapping, QueryPolicy policy)
 {
     this.linguist = language.CreateLinguist(this);
     this.mapper = mapping.CreateMapper(this);
     this.police = policy.CreatePolice(this);
 }
Esempio n. 3
0
 public QueryPolice(QueryPolicy policy, QueryTranslator translator)
 {
     this.policy = policy;
     this.translator = translator;
 }