我现在的的项目是 NET+MVC+EF,数据库是mysql,各版本如下
EF为6.13
.net framework 4.5.2
mysqlserver 5.7.18
项目本身编译运行没有问题,也可以进后台,后台界面各表的数据用EF语句 可以查询,添加数据都正常,但是修改和删除(代码都是对的,数据库如果是sqlerver中运行正常)都报类似的错误,You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[test].[test_rule] SET ... at line 1
这个如何解决? 更新语句都是标准写法如下
res = ef.test_rule.Where(a => a.TestID == model.TestID).AsNoTracking().Update(a => new test_rule
{
TestName = model.TestName,
ShortTestName=model.ShortTestName
});
删除: result = ef.test_rule.Where(a => a.TestID == yfID).AsNoTracking().Delete();
该外包需求信息来源于站外平台,本站仅提供公开信息部分字段展示与订阅服务,更多请查看免责声明。
不定期副业成功案例分享
200元找人实现
C++的LuaBridge库 有例子 只需要实现几个接口
lua_State* L = luaL_newstate(); // 创建一个新的 Lua 状态
luaL_openlibs(L); // 加载 Lua 标准库
luabridge::LuaRef ret = luabridge::LuaRef::fromStack(L, -1);
std::cout << "序号: " << ret["序号"].cast
luabridge::LuaRef contents = ret["内容"];
for (int i = 0; i < contents.length(); ++i) {
luabridge::LuaRef item = contents[i + 1];
if (item.isNil()) {
std::cerr << "Item at index " << (i + 1) << " does not exist." << std::endl;
continue;
}
std::cout << "内容 " << (i + 1) << ": 名称 = " << item["名称"].caststd::string() << ", x = " << item["x"].cast
}