如何在WCF应用程序中使用模型和控制器类 [英] How to use Model and controller classes in WCF application

查看:74
本文介绍了如何在WCF应用程序中使用模型和控制器类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用WCF开发服务.我已经创建了单独的新WCF应用程序,因此可以在IIS(独立于任何站点)上托管/部署它.

我必须在这些服务中执行一些数据库操作,因此我将需要SQLHelper类(因为我正在使用SQL Helper进行SQL DB接口).但是我无法在此应用程序中添加App_Code文件夹.我已经手动添加了App_Code文件夹,但是在我的服务中没有得到这些类的引用.

请让我知道解决方案,因为我是WCF的新手.

如果SQL Helper类是一个单独的项目,则谢谢

Hi,

I am developing services using WCF. I have created separate new WCF application therefore I can host/deploy it on IIS(Independant on any site).

I have to do some database operation in these services therefore I will require SQLHelper class(As I am using SQL helper for SQL DB interfacing). BUT I can not add App_Code folder in this application. I have manually added App_Code folder BUT I am not getting reference of these classes in my service.

Please let me know the solution as I am new to WCF.

Thanks

推荐答案

.然后,只需将项目的引用添加到WCF应用程序项目中即可.或将SQL Helper项目Dll添加为对WCF项目的引用.您不必创建App_Code文件夹.对于WCF应用程序,所有二进制文件在部署时都会自动进入bin文件夹.
If the SQL Helper Class is a seperate Project. Then Just add the reference of the Project to you WCF Application Project. Or Add the SQL Helper Project Dll as Reference to the WCF Project. You do not have to create an App_Code folder. For WCF Application all the binaries goes to the bin folder itself automatically when you deploy it.


这篇关于如何在WCF应用程序中使用模型和控制器类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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