在.NET MVC上,我应该部署WCF服务客户端吗?

时间:2014-08-07 06:54:48

标签: asp.net-mvc wcf service dispose

我正在开发一个基于.NET MVC的网站,我正在使用ibatis.net的WCF服务。

在我的控制器中,我使用WCF服务,但是我没有处置或关闭WCF客户端。我应该关闭或部署WCF客户端吗?

public class HomeController : BaseResultController
{
    // 1. Create WCF Service 
    SomeWCFClient mSomeWcfC = new SomeWCFClient();

    public ActionResult Index(){

        // 2. Used/Consume some Service 
        IList<SomeModel> lResultData  = mSomeWcfC.GetSomeData(); 

        // 3. [Q]Should I close WCF Service, here? If Yes, let me know Where should i write code 
        //    If I don't have to do also let me know that              

        return View();
    }

}

0 个答案:

没有答案
相关问题