public dynamic CreateEnumPropertyValue([FromBody] CreateEnumPropertyValueInputModel model) { var orchestrator = new EnumPropertyValueOrchestrator(new ModelStateWrapper(this.ModelState)); return(orchestrator.CreateEnumPropertyValue(model).GetResponse()); }
public ResponseWrapper <CreateEnumPropertyValueModel> CreateEnumPropertyValue(CreateEnumPropertyValueInputModel model) { var newEntity = new EnumPropertyValue { Name = model.Name, EnumPropertyId = model.EnumPropertyId, }; context .EnumPropertyValues .Add(newEntity); context.SaveChanges(); var response = new CreateEnumPropertyValueModel { EnumPropertyValueId = newEntity.EnumPropertyValueId, Name = newEntity.Name, EnumPropertyId = newEntity.EnumPropertyId, }; return(new ResponseWrapper <CreateEnumPropertyValueModel>(_validationDictionary, response)); }