// Enable session when using Session object
        //[WebMethod(EnableSession = true)]
        public int AddUser(string name, int goal)
        {
            var user = new User { Goal = goal, Name = name, UserId = 0 };
            this.repo.Add(user);

            return user.UserId;
        }
 public void Save(User updatedUser)
 {
     var user = this.GetById(updatedUser.UserId);
     user.Total = updatedUser.Total;
 }
 public void Add(User user)
 {
     user.UserId = nextId;
     nextId++;
     users.Add(user);
 }