Exemplo n.º 1
0
        public IActionResult Put(int id, [FromBody] ActivityTypeModel updatedactivityType)
        {
            var activityType = _activityTypeService.Update(updatedactivityType.ToDomainModel());

            if (activityType == null)
            {
                return(NotFound());
            }
            return(Ok(activityType.ToApiModel()));
        }
Exemplo n.º 2
0
        public IHttpActionResult PutActivityType(ActivityType activityType)
        {
            var activityTypeFromDb = activityTypeService.Get(activityType.ActivityId);

            if (activityTypeFromDb != null)
            {
                activityTypeService.Update(activityType);
                return(Ok());
            }
            else
            {
                return(NotFound());
            }
        }