Skip to content

Instantly share code, notes, and snippets.

@bzbetty
Created November 15, 2012 09:35
Show Gist options
  • Save bzbetty/4077662 to your computer and use it in GitHub Desktop.
Save bzbetty/4077662 to your computer and use it in GitHub Desktop.
public ActionResult Login(string username, string password) {
if(username != “user” || password != “123”) {
ModelState.AddError(“username or password incorrect”);
return View();
}
return new LoginResult(username); //I typically pass the actual user into the login result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment