如何在UserManager中创建方法?

时间:2014-06-11 16:20:06

标签: c# asp.net-mvc asp.net-mvc-4

如何在UserManager中创建方法,如:

public UserManager<ApplicationUser> UserManager { get; private set; }
public ActionResult SomeAction()
{
  UserManager.MyVoid();
  return View();
}

MyVoid it void will the desired her work

1 个答案:

答案 0 :(得分:4)

如果要返回空结果,可以使用EmptyResult类:

public ActionResult SomeAction()
{
    UserManager.MyVoid();
    return new EmptyResult();
}