public ResponseWrapper<EntityPutModel> PutEntity(EntityPutInputModel model)
 {
     var newEntity = new Entity
     {
         Name = model.Name,
     };
     
     context
         .Entities
         .Add(newEntity);
     
     context.SaveChanges();
     var response = new EntityPutModel
     {
         Name = newEntity.Name,
         EntityId = newEntity.EntityId,
     };
     
     return new ResponseWrapper<EntityPutModel>(_validationDictionary, response);
 }
Exemple #2
0
        public dynamic PutEntity([FromBody] EntityPutInputModel model)
        {
            var orchestrator = new EntityTestOrchestrator(new ModelStateWrapper(this.ModelState));

            return(orchestrator.PutEntity(model).GetResponse());
        }