public async Task <Student> DeleteAsync(int studentId) { var student = await GetStudentByIdAsync(studentId); _context.Remove(student); await _context.SaveChangesAsync(); return(student); }
public bool Remove(long id) { var ent = Find(id); if (ent != null) { _context.Remove(ent); _context.SaveChanges(); return(true); } return(false); }