示例#1
0
 public IActionResult DeleteStudent(string id)
 {
     if (_dbService.GetStudent(id) != null)
     {
         _dbService.DeleteStudent(id);
         return(Ok("Proces usuwania zakończony"));
     }
     return(NotFound("Nie ma studenta o tym id"));
 }
示例#2
0
 public IActionResult DeleteStudent(string id)
 {
     if (_dbService.GetStudent(id) != null)
     {
         _dbService.DeleteStudent(id);
         return(Ok("Usuwanie zakończone"));
     }
     return(NotFound("Nie znaleziono studenta o tym id"));
 }
示例#3
0
        public IActionResult DeleteStudent(string id)
        {
            var response = _dbContext.DeleteStudent(id);

            if (response != null)
            {
                return(Ok(response));
            }



            return(NotFound("Nie mamy studentów"));
        }
示例#4
0
        public IActionResult DeleteStudent(string index)
        {
            var res = _service.DeleteStudent(index);

            if (res == true)
            {
                return(Ok("Usunieto studenta o indeksie " + index));
            }
            else
            {
                return(NotFound("Nie ma takiego studenta"));
            }
        }
示例#5
0
        public async Task <IActionResult> DeleteStudent(string sIndex)
        {
            int res = await _service.DeleteStudent(sIndex);


            if (res == -1)
            {
                return(NotFound("Student with given index does not exist"));
            }
            else
            {
                return(Ok("Student deleted"));
            }
        }
示例#6
0
        public IActionResult DeleteStudent(string index)
        {
            var result = _dbService.DeleteStudent(index);

            if (result.Equals("OK"))
            {
                return(Ok("Student was deleted"));
            }
            else if (result.Equals("Bad Request"))
            {
                return(BadRequest());
            }
            else
            {
                return(NotFound());
            }
        }
示例#7
0
 public IActionResult DeleteStudent(int id)
 {
     _studentsDbService.DeleteStudent(id);
     return(Ok("Usuwanie ukończone"));
 }
示例#8
0
 public IActionResult DeleteStudent(string indexNumber)
 {
     _dbService.DeleteStudent(indexNumber);
     return(Ok("Deleted"));
 }
示例#9
0
 public IActionResult DeleteStudent(string index)
 {
     _studentsDbService.DeleteStudent(index);
     return(Ok("Usuwanie ukończone"));
 }