BeerDrinkin.Core.ViewModels.UserProfileViewModel.Init C# (CSharp) Method

Init() public method

public Init ( string userId = "" ) : System.Threading.Tasks.Task
userId string
return System.Threading.Tasks.Task
        public async Task Init(string userId = "")
        {
            if (!string.IsNullOrEmpty(userId))
            {
                user = await userStore.GetItemAsync(userId);                
            }
            else
            {

            }

            if (user == null)
                return;

            FirstName = user.FirstName;
            LastName = user.LastName;
            AvatarUrl = user.Avatar.LargeUrl;

            var ratings = await ratingStore.GetRatingsForUser(userId);
            Ratings = ratings.ToList();
            RatingsCount = ratings.Count();

            var wishes = await wishStore.GetWishesForUser(userId);
            Wishes = wishes.ToList();
            WishCount = wishes.Count();
        }
UserProfileViewModel