EF6首先使用SQLite模型创建数据库 [英] EF6 Create DB using SQLite Model First

查看:508
本文介绍了EF6首先使用SQLite模型创建数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用SQLite创建了包含我的数据库模式的edmx文件。
启动应用程序时,我希望该应用程序创建一个新的db文件。我尝试使用Database.CreateIfNotExists(),但是它什么也没做。

I have created edmx file containing my db schema using SQLite. When I launch the application, I would like the application to create a new db file. I tried to use Database.CreateIfNotExists(), but it doesn't do anything.

我知道它首先是模型,而不是代码。可以为模型优先创建新的数据库文件吗?

I understand that it is a model first and not a code first. Is it possible to create a new db file for "model first"?

谢谢,
Sam

Thanks, Sam

推荐答案

提供商不支持此方法: http://system.data.sqlite.org/index.html/tktview?name=6b5ef4ff7a http://system.data.sqlite.org/index.html/tktview?name=eb0cada674

This is not supported by the provider: http://system.data.sqlite.org/index.html/tktview?name=6b5ef4ff7a and http://system.data.sqlite.org/index.html/tktview?name=eb0cada674

这篇关于EF6首先使用SQLite模型创建数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆