使用MVC和Entity数据模型向表中添加新字段时出现问题 [英] Problem while adding new fields to the table using MVC and Entity data model

查看:133
本文介绍了使用MVC和Entity数据模型向表中添加新字段时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我正在使用带有实体数据模型的asp.net mvc.
我向现有表中添加了一些字段,并更新了edmx文件.
新字段在视图和控件中可用.
但是我的问题是,当我尝试添加或更新时,新添加的字段没有更新或插入.但其他字段没有任何问题.

Hi all
I''m using asp.net mvc with entity data model.
I have added few fields to an existing table and updated the edmx file.
The new fields are available in the views and controls.
But my problem is, when i try to add or update, the newly added fields are not updating or inserting. but the other fields does not have any problems.
Can you please help me to fix the problem.

推荐答案

对于初学者来说,
For starters, this tutorial actually gives a pretty good demonstration on the creation and subsequent alteration of the data model.

My suggestion to see if everything is good would be to look at the code behind for the insert and update actions. Make sure that your new fields appear here as they should and that any sql or procedure calls have the parameters properly defined. If you are access procedures, make sure that the database itself has the new fields properly implemented.

If at this point you are still getting errors or struggling with this, post some relevant code snippets and we can examine the issue from that perspective.


这篇关于使用MVC和Entity数据模型向表中添加新字段时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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