private async Task <long> UpdateUserName(Guid userId)
        {
            var subscriptionForThisUsers = await _SubscriptionDbService.GetByUser(userId);

            if (subscriptionForThisUsers.Count == 0)
            {
                return(0);
            }
            var user = await this.GetUser(userId);

            return(this._SubscriptionDbService.UpdateUserInformation(userId, user.Code, user.Name));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Get subscriptions by user id
 /// </summary>
 /// <param name="id">User Id</param>
 /// <returns>List of user's subscriptions</returns>
 public Task <IList <UserSubscriptionModel> > GetByUser(Guid id)
 {
     return(_DbService.GetByUser(id));
 }