public List<Point> GetGeolocationPoints(User user, Func<Point, bool> expr = null)
    {
      if (expr != null)
      {
        return user.Points.Where(expr).ToList();
      }

      return user.Points;
    }
    private User GetUser(UserAuthViewModel userModel)
    {
      User user = new User
      {
        UserName = userModel.UserName,
        Email = userModel.Email
      };

      return user;
    }
        public SubscriberViewModel GetViewModel(User obj, Point latestPoint)
        {
            var viewModel = new SubscriberViewModel
              {
            Id = obj.Id,
            UserName = obj.UserName,
            LatestPoint = latestPoint != null ? this.PointMapper.GetViewModel(latestPoint) : null
              };

              return viewModel;
        }
 public void DeleteUser(string userId)
 {
   var user = new User { Id = userId };
   this.DbSet.Attach(user);
   this.DbSet.Remove(user);
 }
 public void AddUser(User user)
 {
   this.DbSet.Add(user);
 }
 public void AddUser(User user)
 {
   this.UserRepository.AddUser(user);
 }
 public List<PointViewModel> GetGeolocationPoints(User user, Func<Point, bool> expr = null)
 {
   return this.PointMapper.GetViewModelList(this.UserRepository.GetGeolocationPoints(user, expr));
 }
    public async Task<IdentityResult> CreateAsync(User user)
    {
      var result = await this._userManager.CreateAsync(user);

      return result;
    }