Esempio n. 1
0
        public async Task <IActionResult> DeleteMajor(int id)
        {
            var mj = await _majorService.GetTById(id);

            if (mj == null)
            {
                return(NotFound());
            }
            _majorService.DeleteT(mj);
            if (!await _majorService.Save())
            {
                return(StatusCode(500, "删除专业信息时出错"));
            }
            return(NoContent());
        }