Beispiel #1
0
 public AffiliateReturnModel CreateAffiliate(ApplicationUser appUser, UserExtension extension)
 {
     return(new AffiliateReturnModel
     {
         Email = appUser.Email,
         FirstName = appUser.FirstName,
         LastName = appUser.LastName,
         PhoneNumber = appUser.PhoneNumber,
         Username = appUser.UserName,
         IndividualDescription = extension.IndividualDescription,
         SkypeHandle = extension.SkypeHandle
     });
 }
Beispiel #2
0
 public ExtendedUserReturnModel Create(ApplicationUser appUser, UserExtension extension)
 {
     return(new ExtendedUserReturnModel
     {
         Url = _UrlHelper.Link("GetUserById", new { id = appUser.Id }),
         Id = appUser.Id,
         UserName = appUser.UserName,
         FullName = string.Format("{0} {1}", extension.FirstName, extension.LastName),
         FirstName = extension.FirstName,
         LastName = extension.LastName,
         Email = appUser.Email,
         EmailConfirmed = appUser.EmailConfirmed,
         Level = appUser.Level,
         Credits = extension.Credits.ToString(),
         IndividualDescription = extension.IndividualDescription,
         PhoneNumber = extension.PhoneNumber,
         SkypeHandle = extension.SkypeHandle,
         JoinDate = appUser.JoinDate,
         Roles = _AppUserManager.GetRolesAsync(appUser.Id).Result,
         Claims = _AppUserManager.GetClaimsAsync(appUser.Id).Result
     });
 }