コード例 #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"));
            }
        }
コード例 #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());
 }
コード例 #4
0
 public int Delete(int id)
 {
     return(_eventLogic.Delete(id));
 }