我正在使用实体框架工作,并且休息是我的创建上下文方法,我已经在调用时启用了外键,但令我惊讶的是,值变量始终为0
private static DataBaseEntity CreateContext()
{
var context = new DataBaseEntity("name=DataBaseEntity");
context.ExecuteStoreCommand("PRAGMA foreign_keys = ON");
var value = context.ExecuteStoreCommand("PRAGMA foreign_keys");
return context;
}
Run Code Online (Sandbox Code Playgroud)
我想在删除功能上有级联,但我无法得到它,因为外键约束没有设置
我正在使用SQLite 3.6.23.1与ado.net提供程序