Beispiel #1
0
 public string DeleteAuto(string id)
 {
     try
     {
         _autoData.DeleteAuto(Int32.Parse(id));
         return(string.Format("Auto has been deleted with id {0}", id));
     }
     catch (Exception)
     {
         return(string.Format("Error Deleting new Car"));
     }
 }
        public async Task <IActionResult> Delete(string autoId)
        {
            await _autoData.DeleteAuto(autoId);

            return(Json(new { success = true, message = "Delete successful" }));
        }