public async Task <IActionResult> Delete(string id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var affectedResult = await _lopHocPhanService.Delete(id);

            if (affectedResult == 0)
            {
                return(BadRequest());
            }
            return(Ok());
        }
Example #2
0
        public void Delete(FormDataCollection form)
        {
            var key = Convert.ToInt32(form.Get("key"));

            _lopHocPhanService.Delete(key);
        }