public async Task <ActionResult> CreateEntity([FromBody] CarDTO data) { if (HttpContext.Request.ContentType != "application/json") { return(StatusCode(415)); } try { var created = await _carsService.CreateEntity(data); return(Ok(created)); } catch (Exception e) { //Need to change this somehow Console.WriteLine(e); throw; } }