我正在开发一个基于.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();
}
}