public void Whether_Ceder_Update_Query_Work() { var uuid = 174103530611572736; var cedarSession = new CedarSession(uuid ); Assert.AreNotEqual(null, "Cedar session is not null, cedar connection opened"); var ctr = cedarSession.Select("select * from employee_"+uuid, null, Cedar.CommandType.Query); Assert.AreEqual(4, ctr.Count(), "4 Rows selected"); var address = "C-25 New Delhi"; cedarSession.Update("update employee_" + uuid + " set address=@Address where first_name=@FirstName", new { FirstName = "Prakash", Address = address }, Cedar.CommandType.Query); ctr = cedarSession.Select("select address from employee__" + uuid + " where first_name=@FirstName", new { FirstName = "Prakash" }, Cedar.CommandType.Query); Assert.AreEqual(address,ctr, "Changed adress updated"); cedarSession.Close(); }
public void Whether_Ceder_Select_Query_Work() { var uuid = 174103530611572736; var cedarSession = new CedarSession(uuid ); Assert.AreNotEqual(null, "Cedar session is not null, cedar connection opened"); var ctr = cedarSession.Select("select * from employee_"+uuid, null, Cedar.CommandType.Query); Assert.AreEqual(4, ctr.Count(), "4 Rows selected"); ctr = cedarSession.Select("select * from employee_"+uuid+" where first_name=@FirstName", new { FirstName = "Tarun" }, Cedar.CommandType.Query); Assert.AreEqual(1, ctr.Count(), "1 Rows selected"); cedarSession.Close(); }