public async Task <IActionResult> Delete(int?storeId, int?productId) { if (storeId == null || productId == null) { Log.Warning("Id Stock Equal Null"); return(BadRequest()); } var stock = await _stockServices.DeleteAsync(storeId.Value, productId.Value); if (stock) { TempData["Success"] = _commonLocalizer.GetLocalizedHtmlString("msg_DeleteSuccess").ToString(); return(RedirectToAction("Index")); } TempData["Error"] = _commonLocalizer.GetLocalizedHtmlString("msg_DeleteError").ToString(); Log.Error("Delete Stock Error"); return(RedirectToAction("Index")); }