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