Ejemplo n.º 1
0
        public IActionResult OnPost(int locationId)
        {
            try
            {
                var location = locationData.Delete(locationId);
                locationData.Commit();

                if (location == null)
                {
                    return(RedirectToPage("./NotFound"));
                }

                TempData["Message"] = $"{location.Name} wurde gelöscht!";
                return(RedirectToPage("./List"));
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
 public bool Delete(int id)
 {
     return(locationData.Delete(id));
 }