public async Task <bool> Delete(int flightId) { var flight = await GetById(flightId); try { _context.Remove(flight); return(await _context.SaveChangesAsync() > 0); } catch (Exception e) { Console.WriteLine(e); return(false); } }