Beispiel #1
0
        public async Task <IActionResult> Delete(Guid id, Guid deleteId)
        {
            if (id == deleteId)
            {
                if (await _storesService.Remove(id))
                {
                    return(RedirectToAction(nameof(Index)));
                }
                ModelState.AddModelError("System", "Failed to delete");
            }

            Stores store = await _storesService.FindBy(id);

            return(View(store));
        }