public IFormsAuthentication FormsAuth { get; private set; }
protected IService AllService { get; private set; }
public AccountController() : this(null, null) { } 因为构造函数有两个参数 因此必须添加这个,否则报错
public AccountController(IFormsAuthentication formsAuth, IService service)
{
FormsAuth = formsAuth ?? new Service.FormsAuthenticationService();
AllService = service ?? new Service.Service();
}
下面的这个样子 就不必了
public IZhddData ZhddData { get; private set; }
public ZhddController()
{
this.ZhddData = new ZhddData ();
}