コード例 #1
0
 public UserViewModel(User u)
 {
     Id = u.Id;
     UserName = u.UserName;
     AuthoredQuoteIds = u.AuthoredQuotes.Select(x => x.Id);
     SubmittedQuoteIds = u.SubmittedQuotes.Select(x => x.Id);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public RegisterViewModel(User fromUser)
 {
     UserName = fromUser.UserName;
 }
コード例 #4
0
 public LoginViewModel(User fromUser)
 {
     UserName = fromUser.UserName;
 }