private async Task DoGetQueryNull() { var obj = await connection.RunAsync(testTable.Get(insertedObject.Id)); Assert.That(obj, Is.Not.Null); Assert.That(obj.Id, Is.EqualTo(insertedObject.Id)); }
public void NumericIdGet() { var resp = connection.Run(testTable2.Insert(new TestObject2() { Id = 1, Name = "Woot" })); Assert.That(resp.Inserted, Is.EqualTo(1)); var to = connection.Run(testTable2.Get(1)); Assert.That(to, Is.Not.Null); Assert.That(to.Id, Is.EqualTo(1)); }
public void LongAndIntTests() { var testObj = new TestObject3() { Id = 3, Value_Int = 1354353535, Value_Int_Nullable = 3, Value_Long = 2222222222, Value_Long_Nullable = 2 }; var resp = connection.Run(testTable3.Insert(testObj)); Assert.That(resp.Inserted, Is.EqualTo(1)); var to = connection.Run(testTable3.Get(3)); Assert.That(to, Is.Not.Null); Assert.That(to.Id, Is.EqualTo(3)); }
public ActionResult IndexPost(int num) { using (var conn = ConnectionFactory.Get()) conn.Run(tUsers.Get("some-user-id")); return(Json(new { success = true })); }
private async Task DoGetQueryNull() { var obj = await connection.RunAsync(testTable.Get("58379951-6208-46cc-a194-03da8ee1e13c")); Assert.That(obj, Is.Null); }
public void HasFields_OnSingleObject_ReturnsFalseWhenFieldIsNull() { var result = this.connection.Run(testTable.Get("1").HasFields(m => m.Name)); Assert.That(result, Is.False); }