public void GetCountTest2() { var sql = DapperExt.GetCount("id = @w_id", new { w_id = 1 }, "myt"); var exp = "SELECT COUNT(*) FROM myt WHERE id = @w_id"; Assert.Equal(exp, sql); }
public void GetCountTest() { var con = new { id = 1 }; var sql = DapperExt.GetCount(con, "myt"); var exp = "SELECT COUNT(*) FROM myt WHERE id = @w_id"; Assert.Equal(exp, sql); }