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(); }
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(); }
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); } } }
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); } } }