REST服务中的ADO.Net实体数据模型? [英] ADO.Net Entity Data model in REST services ?

查看:117
本文介绍了REST服务中的ADO.Net实体数据模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我必须创建REST服务并在数据库中插入新记录..我想知道ADO.NET实体数据模型(edmx)文件对在REST服务中创建新记录有用吗?

谢谢,

Hi,,
I have to create REST services and insert a new record in the database ..I want to know is ADO.NET Entity Data Model(edmx) file useful to create a new record in REST services?

Thanks,,

推荐答案

尝试此链接,

http://stackoverflow.com/questions/7013776/insert- a-new-record-in-my-db-using-odata [
Try this link,

http://stackoverflow.com/questions/7013776/insert-a-new-record-in-my-db-using-odata[^]


首先确保 WCF REST 是否确实服务在应用程序体系结构中插入新记录所必需.以下是从 WCF REST 服务开始的一些很好的参考.

http://msdn.microsoft.com/en-us/magazine/dd315413.aspx

http://msdn.microsoft.com/en-us/library/ee391967.aspx

要使用 WCF REST 服务插入数据,您将需要 POST 方法.下面的链接将为此提供大量CodeProject文章.

http://www.codeproject.com/search.aspx?q=WCF+ Rest + post& sbo = kw

一旦您的 POST 方法获取XML/JSON形式的数据,您就可以使用Ado.Net/Entity Framework将其插入数据库.下面的文章提供了带有实体框架的WCF REST服务"的示例.

Firstly make sure, does WCF REST service really required for inserting a new record in your application architecture. Below are some good references to start with WCF REST services.

http://msdn.microsoft.com/en-us/magazine/dd315413.aspx

http://msdn.microsoft.com/en-us/library/ee391967.aspx

To insert your data using WCF REST service, you will require POST method. Below link will provide you plenty of CodeProject articles on this.

http://www.codeproject.com/search.aspx?q=WCF+Rest+post&sbo=kw

Once your POST method gets data in the form of XML/JSON then you can insert it into Database using Ado.Net/Entity Framework. Below article has an example of "WCF REST service with Entity Framework".

wcf-rest-service-with-odata-and-entity-framework


这篇关于REST服务中的ADO.Net实体数据模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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