如何在mvc 4中添加实体模型 [英] how to add entity model in mvc 4

查看:75
本文介绍了如何在mvc 4中添加实体模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在我的网络应用程序中,我使用数据库现有方法进行实体框架。我做了创建实体数据模型的正确步骤。之后所有问题都是我无法在Model文件夹下看到model.context和表模型。我只能看到edmx文件。我刷新并重建了项目,之后也没有显示。请帮助我。

Hi All,

In my web application i am using database existing approach for entity framwork. i did the correct step for creating entity data model.after all the problem is that i cant see the model.context and models of tables under Model folder. i can see only edmx file. i refreshed and rebuild the project ,after that also its not showing.please help me.

推荐答案

我解决了这个问题。通过在edmx文件中添加代码生成项选项。我从Nuget.it为c#模板选择dbcontext生成器生成所有文件,如上下文和模型类。
I solved the issue. by went for add code generate item option in edmx file.the i chose dbcontext generator for c# template from Nuget.it generate all the files like context and model classes.


这篇关于如何在mvc 4中添加实体模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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