public async Task <IActionResult> CreateOneAsync( [FromBody] CreateResourceDto resource ) { try { var item = await _resourceService.CreateOneAsync(resource.ToEntity()); return(Ok(item)); } catch (Exception e) { return(HttpExceptionMapper.ToHttpActionResult(e)); } }