如何在ASP.Net Boilerplate中使用WCF服务? [英] How to work wirth WCF services in ASP.Net Boilerplate?

查看:96
本文介绍了如何在ASP.Net Boilerplate中使用WCF服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过Web服务(WCF)进行CRUD,但我使用的是样板框架,我的问题是如何在样板中使用Web服务(WCF)?任何有用的链接或教程?

I want to do CRUD by web-services(WCF), but i am using boilerplate framework , my question is how to work with web-services(WCF) in boilerplate?? any helpful link or tutorial??

推荐答案

在使用WCF应用程序的解决方案中创建一个新项目,在该新项目中添加wcf服务,使用实体框架,然后编写所需的服务,然后在YourProject中. Web项目添加服务参考并获取您需要的服务.在控制器中创建服务对象,并根据需要获取或发布数据.从解决方案属性中设置多个启动项目,并以WcfService-Project和Yorproject.web-Project作为开始.现在启动两个项目并使用服务.就是这样.

Create a new project in your solution with WCF application, add wcf service in this new project, use entity framework and then write services you need, then in YourProject.Web project add service reference and get the service you need. Create object of the service in your controller and get or post data according to your need. Set multiple startup projects from solution properties and give WcfService-Project and Yorproject.web-Project as start. Now start both projects and use services. That's all.

这篇关于如何在ASP.Net Boilerplate中使用WCF服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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