Example #1
0
        public void GetConnection()
        {
            var task = Task.Run(() =>
            {
                using (Daytona.Store.Context context = new Daytona.Store.Context())
                {
                    using (var connection = context.GetConnection<Customer>())
                    {
                        Assert.IsInstanceOfType(connection, typeof(Daytona.Store.Connection));
                    }
                }
            });

            task.Wait();
        }
Example #2
0
        public void GetConnection()
        {
            var task = Task.Run(() =>
            {
                using (Daytona.Store.Context context = new Daytona.Store.Context())
                {
                    using (var connection = context.GetConnection <Customer>())
                    {
                        Assert.IsInstanceOfType(connection, typeof(Daytona.Store.Connection));
                    }
                }
            });

            task.Wait();
        }
Example #3
0
 public void SaveACustomer()
 {
     using (Daytona.Store.Context context = new Daytona.Store.Context())
     {
         using (var connection = context.GetConnection<Customer>())
         {
             var customer = new Customer
             {
                 Firstname = "John",
                 Lastname = "Lemon"
             };
             var task = connection.Save(customer);
             int id = task.Result;
             Assert.AreEqual(1, id);
         }
     }
 }
Example #4
0
 public void SaveACustomer()
 {
     using (Daytona.Store.Context context = new Daytona.Store.Context())
     {
         using (var connection = context.GetConnection <Customer>())
         {
             var customer = new Customer
             {
                 Firstname = "John",
                 Lastname  = "Lemon"
             };
             var task = connection.Save(customer);
             int id   = task.Result;
             Assert.AreEqual(1, id);
         }
     }
 }