예제 #1
0
        public IActionResult DeleteYield(int yieldId)
        {
            var yield = _yieldService.GetYieldById(yieldId);

            if (yield.UserId != userId)
            {
                return(RedirectToAction("Index"));
            }
            _yieldService.DeleteYield(yieldId);
            return(RedirectToAction("Index"));
        }