Ejemplo n.º 1
0
        public IActionResult DeleteEvent(int id)
        {
            try
            {
                bool succes = _eventLogic.Delete(id);

                if (!succes)
                {
                    return(NotFound());
                }

                return(Ok(true));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, "Internal server error"));
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Delete([FromRoute] int id)
        {
            await _eventLogic.Delete(id);

            return(RedirectToAction("Index"));
        }
 public IActionResult Delete([FromRoute] string id)
 {
     _eventLogic.Delete(id);
     return(NoContent());
 }
Ejemplo n.º 4
0
 public int Delete(int id)
 {
     return(_eventLogic.Delete(id));
 }