public ActionResult <CreateCuisineType> CreateCuisineType(CreateCuisineType model) { try { IMapper mapper = EDeliveryProfile.CreateCuisineType(); var cuisineType = mapper.Map <CuisineType>(model); _repository.CreateCuisineType(cuisineType); return(new ObjectResult(new { message = "success", statusCode = HttpStatusCode.OK, response = "Created new cuisine type" })); } catch (Exception ex) { _logger.LogError($"Failed to create new cuisine type:{ex}"); return(BadRequest("Failed to create new cuisine type: ")); } }