public ResponseWrapper <CreateSchemaModel> CreateSchema(CreateSchemaInputModel model) { var newEntity = new Schema { Name = model.Name, ApplicationId = model.ApplicationId, }; context .Schemas .Add(newEntity); context.SaveChanges(); var response = new CreateSchemaModel { Name = newEntity.Name, SchemaId = newEntity.SchemaId, ApplicationId = newEntity.ApplicationId, }; return(new ResponseWrapper <CreateSchemaModel>(_validationDictionary, response)); }
public dynamic CreateSchema([FromBody] CreateSchemaInputModel model) { var orchestrator = new SchemaOrchestrator(new ModelStateWrapper(this.ModelState)); return(orchestrator.CreateSchema(model).GetResponse()); }