Skip to content

Instantly share code, notes, and snippets.

@darrenshrwd
Created August 20, 2014 04:21
Show Gist options
  • Save darrenshrwd/74bc99fa95d6df493588 to your computer and use it in GitHub Desktop.
Save darrenshrwd/74bc99fa95d6df493588 to your computer and use it in GitHub Desktop.
AsyncModel (helper class)
public class AsyncModel<T>
{
private readonly Func<T> _controllerCode;
public AsyncModel(Func<T> controllerCode)
{
_controllerCode = controllerCode;
}
public T Execute()
{
return _controllerCode();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment