如何在VS 2015中启用CRUD操作?
你好,
我正在使用ASP.NET MVC 5和MySQL以及EF数据库第一种方法。我在VS 2015 enterpise工作,我使用VS 2013 proffesional来检查是否存在一些问题。
在我的edmx文件中,是一个名为Users的类。我想在将CRUD操作添加到项目期间用作模型类。我的步骤:
1.编译项目(无错误)。
2.控制器 - >添加 - >控制器 - >带有视图的MVC 5控制器,使用EF。
3.这里显示了一个带有字段模型类和数据上下文类的窗口。问题是VS 2015(和2013)没有看到我的模型和上下文类(组合框是空的)。因此,即使我在正确的字段中写了我的模型类和数据上下文类的名称,我也无法单击确定并完成。
我清理并重建解决方案查看时间并且我检查我的数据库连接everythink看起来不错。
我骑着文章:使用实体框架6数据库进行CRUD操作首先使用MVC 5,但问题仍然是一样的。
我的问题是如何将CRUD操作添加到我的Users类?
Hello,
I am using ASP.NET MVC 5 and MySQL and EF databasefirst approach. I work in VS 2015 enterpise and i use VS 2013 proffesional to check if there are some problems.
In my edmx file "is" a class called Users. I want to use as a model class during adding CRUD actions to my project. My steps:
1. Compile project (no errors).
2. Controllers->Add->Controller-> MVC 5 controller with views, using EF.
3. Here shows a window with fields model class and data context class. The problem is that VS 2015(and 2013) do not see my model and context class(combobox is empty). So even I wrote names of my model class and data context class in right fields i cannot click OK and finish.
I clened and rebuild a solution view times and i check my database connections everythink looks good.
I rode article: "CRUD operation with Entity Framework 6 Database First using MVC 5", but the problem is still the same.
My question is how to add CRUD actions to my Users class?
您使用的是本地数据库吗?
are you using a local database?