コード例 #1
0
        public async Task <IActionResult> XoaSinhVien(long id)
        {
            var claim = User.Claims.FirstOrDefault(c => c.Type == "id");

            if (!User.Identity.IsAuthenticated || claim == null)
            {
                return(Unauthorized());
            }

            var serviceResult = await _sinhVienService.XoaSinhVien(id);

            return(Ok(serviceResult));
        }