// PUT api/Activity/5
        public IHttpActionResult Put(Goal goal)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                return(Ok(Logic.Update(goal)));
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Logic.Exists(goal.Id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }