Created
April 4, 2014 03:41
-
-
Save chandu/9967659 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LoginViewModel | |
| { | |
| public string UserName { get; set; } | |
| public string Password { get; set; } | |
| public bool RememberMe { get; set; } | |
| //TODO: (CV) These should go to ViewBag later | |
| public IDictionary<string, IEnumerable<string>> Errors { get; set; } | |
| public IEnumerable<string> FlattenedErrors | |
| { | |
| get { return (Errors != null)? Errors.SelectMany(a => a.Value):Enumerable.Empty<string>(); } | |
| } | |
| public bool HasErrors | |
| { | |
| get { return FlattenedErrors.Any(); } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment