Exemplo n.º 1
0
 public object Post(AddCalories request)
 {
     var user = Repository.GetUsers(request.UserId);
     user.Total +=request.Amount;
     Repository.UpdateUse(user);
     return new AddCaloriesResponse{NewTotal = user.Total};
 }
Exemplo n.º 2
0
        public object Post(AddCalories request)
        {
            var user = Repository.GetUsers(request.UserId);

            user.Total += request.Amount;
            Repository.UpdateUse(user);
            return(new AddCaloriesResponse {
                NewTotal = user.Total
            });
        }