コード例 #1
0
 public object Post(AddProtein request)
 {
     var user = Repository.GetUsers(request.UserID);
     user.Total += request.Amount;
     Repository.UpdateUser(user);
     return new AddProteinResponse {NewTotal = user.Total};
 }
コード例 #2
0
        public object Post(AddProtein request)
        {
            var user = Repository.GetUsers(request.UserID);

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