public async Task <IHttpActionResult> Post(ProcessorDTO processorDTO) { if (ModelState.IsValid) { return(BadRequest(ModelState)); } try { var processor = mapper.Map <Processor>(processorDTO); processor = await processorService.Insert(processor); return(Ok(processor)); } catch (Exception e) { return(InternalServerError(e)); } }