You would basically use it to signify that you are not doing anything with an action's
result.
From MSDN:
Represents a result that does nothing, such as a controller action method that returns nothing.
I have personally used on actions defined in an AsyncController
, so if you have for instance an async action like:
public void SendMailAsync() { }
Basically an action in an AsnycController
, you'll need a xxxCompleted action as well (by convention)
public virtual ActionResult SendMailCompleted
{
// do whatever
return new EmptyResult();
}
Since this is not an action meant to be called by a user but by a background task, I'm not going to do anything with the result anyway.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…