public UserViewModel(User u) { Id = u.Id; UserName = u.UserName; AuthoredQuoteIds = u.AuthoredQuotes.Select(x => x.Id); SubmittedQuoteIds = u.SubmittedQuotes.Select(x => x.Id); }
private async Task SignInAsync(User user, bool isPersistent) { AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie); var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie); AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity); }
public RegisterViewModel(User fromUser) { UserName = fromUser.UserName; }
public LoginViewModel(User fromUser) { UserName = fromUser.UserName; }