public IHttpActionResult DeleteAdministrator(int id)
        {
            Administrator administrator = administratorService.DeleteAdministrator(id);

            if (administrator == null)
            {
                return(NotFound());
            }

            return(Ok(administrator));
        }
        public ActionResult DeleteAdministrator([FromBody] int id)
        {
            int response = service.DeleteAdministrator(id);

            if (response == 1)
            {
                return(Json(1));
            }
            else
            {
                return(Json(0));
            }
        }
Example #3
0
 public bool Delete(int id)
 {
     _adminService.DeleteAdministrator(id);
     return(true);
 }