public IActionResult DeleteYield(int yieldId) { var yield = _yieldService.GetYieldById(yieldId); if (yield.UserId != userId) { return(RedirectToAction("Index")); } _yieldService.DeleteYield(yieldId); return(RedirectToAction("Index")); }