public async Task <ActionResult> Delete(long id) { try { if (ModelState.IsValid) { ProductViewModel result = await productBLL.DeleteAsync(id); if (result != null) { return(Ok(new { status = 200, message = "Product Deleted succesfull.", obj = result })); } } } catch (Exception e) { } return(BadRequest(new { status = 400, message = "Sorry! Something went wrong please try again" })); }