public async Task <bool> DeleteAsync(int id) { var customer = await _context.StudentInfos.SingleOrDefaultAsync(c => c.Id == id); _context.Remove(customer); try { return(await _context.SaveChangesAsync() > 0 ? true : false); } catch (System.Exception exp) { } return(false); }