Beispiel #1
0
        public override IHttpActionResult Put(Feature model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var isFeatureExist = _service.IsFeatureExist(model.Name, model.Id, ActionType.Put);

            if (isFeatureExist)
            {
                return(BadRequest(model.Name + " feature already exist."));
            }

            return(Ok(_service.EditAsHost(model)));
        }