如何在EF模型中使用JTable(数据库第一个approch) [英] How do I use JTable with EF Model (database first approch)

查看:122
本文介绍了如何在EF模型中使用JTable(数据库第一个approch)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如链接所示:

使用ASP.NET MVC 3和jTable jQuery插件的基于AJAX的CRUD表



我创建了一个简单的应用程序。我首先创建了数据库并使用edmx文件在应用程序中创建了Model。



起初,只有一个表(父),应用程序正常工作。



然后,我在数据库中添加了另一个表(子)并更新了edmx文件。



其后,之前工作的屏幕开始显示错误,消息是与服务器通信时发生错误。



请指教,谢谢。

Hi,

As shown in the link:
AJAX based CRUD tables using ASP.NET MVC 3 and jTable jQuery plug-in

I created a simple application. I created the database first and created Model in the application using the edmx file.

At first, there was only one table (parent) and the application was working correctly.

Then, I added another table (child) in database and updated the edmx file.

Thereafter, the previously working screen began to show error and the message is "An error occured while communicating to the server".

Please advice, Thank you.

推荐答案

在这种情况下似乎问题是构造的JSON对象还包含与子对象集合的关系。

jTable似乎并不理解这一点。



当您创建一个仅包含列属性的新类并复制所有值时,该表将再次起作用,但真正的好处使用jTable的消失......
The problem seems to be in this case that the constructed JSON object also contains the relation to the collection of child object(s).
jTable does not seem to understand this.

When you create a new class with the column properties only and copy all values across, the table will work again, but then the real benefit of using jTable is gone...


这篇关于如何在EF模型中使用JTable(数据库第一个approch)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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