public Task CreateAsync(Identity.ApplicationUser appUser) { var user = new User() { Id = Guid.NewGuid(), UserName = appUser.UserName, PasswordHash = appUser.PasswordHash, SecurityStamp = appUser.SecurityStamp }; _unitOfWork.UserRepository.Add(user); return(_unitOfWork.CommitAsync()); }
public static UserList FromDataUser(Identity.ApplicationUser user, Image thumbnail) { return(new UserList { DatabaseId = user.Id, Id = user.RoadieId, User = new DataToken { Text = user.UserName, Value = user.RoadieId.ToString() }, IsEditor = user.UserRoles.Any(x => x.Role.Name == "Editor"), IsPrivate = user.IsPrivate, Thumbnail = thumbnail, CreatedDate = user.CreatedDate, LastUpdated = user.LastUpdated, RegisteredDate = user.RegisteredOn, LastLoginDate = user.LastLogin, LastApiAccessDate = user.LastApiAccess }); }