Beispiel #1
0
 public void IsAContext()
 {
     using (Daytona.Store.Context context = new Daytona.Store.Context())
     {
         Assert.IsInstanceOfType(context, typeof(Daytona.Store.Context));
     }
 }
Beispiel #2
0
 public void IsAContext()
 {
     using (Daytona.Store.Context context = new Daytona.Store.Context())
     {
         Assert.IsInstanceOfType(context, typeof(Daytona.Store.Context));
     }
 }
Beispiel #3
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();
        }
Beispiel #4
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();
        }
Beispiel #5
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);
         }
     }
 }
Beispiel #6
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);
         }
     }
 }