public async Task <ActionResult> Post(CategoryViewModel categoryViewModel) { try { if (ModelState.IsValid) { CategoryViewModel result = await categoryBLL.AddCategoryAsync(categoryViewModel); if (result != null) { return(Ok(new { status = 200, message = "Category added succesfull.", obj = result })); } } } catch (Exception e) { } return(BadRequest(new { status = 400, message = "Sorry! Something went wrong please try again." })); }