public IActionResult DeleteRegistrationById(string id)
        {
            try
            {
                _dbContext.DeleteByIdAsync(id);

                return(Ok(id));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
示例#2
0
        public IActionResult DeleteStudentById(string id)
        {
            try
            {
                _dbContext.DeleteByIdAsync(id);

                return(Ok(id));
            }
            catch (System.Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }