Exemplo n.º 1
0
        public void TestExecuteSql()
        {
            string insertString = "INSERT INTO  [tbTemp]([RegionCode] ,[RegionName] ,[InputString] ,[Upcode]) values(@RegionCode,@RegionName,@InputString,@Upcode)";
            Dictionary <string, object> dicParameters = new Dictionary <string, object>();

            dicParameters.Add("@RegionCode", Guid.NewGuid().ToString());
            dicParameters.Add("@RegionName", "jinke");
            dicParameters.Add("@InputString", "jkjc");
            dicParameters.Add("@Upcode", "");
            int result = MssqlHelper.ExecuteNonQuerySql(insertString, dicParameters);

            Assert.True(result == 1);
        }