public async Task <Response> Delete(int idPakingSpot) { Response response = new Response(); if (idPakingSpot < 0) { response.Errors.Add("ID Inválido!"); } if (response.HasErrors()) { return(response); } else { try { return(response = await _iParkingSpotRepository.Delete(idPakingSpot)); } catch (Exception ex) { _log.Error(ex + "\nStackTrace: " + ex.StackTrace); response.Errors.Add("DataBase error, contact the system owner"); return(response); } } }
public async Task <Response> Delete(int idPakingSpot) { Response response = new Response(); if (idPakingSpot < 0) { response.Errors.Add("ID Inválido!"); } if (response.HasErrors()) { return(response); } else { return(await _iParkingSpotRepository.Delete(idPakingSpot)); } }