Exemple #1
0
        public async Task <IActionResult> DeleteAssignment(int id)
        {
            try
            {
                await _databaseDriver.DeleteAssignment(id);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("../Shared/Error", new ErrorViewModel {
                    Message = "Task cannot be deleted"
                }));
            }
        }