Esempio n. 1
0
        public async Task <IHttpActionResult> DeleteStadium(StadiumIdModel stadium)
        {
            if (!ModelState.IsValid)
            {
                return(InternalServerError());
            }
            try
            {
                await services.Remove(stadium);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
Esempio n. 2
0
        public async Task <ActionResult> Delete(StadiumIdModel stadium)
        {
            await stadiumService.Remove(stadium);

            return(RedirectToAction("Index"));
        }