문제

How can I retrieve distinct rows from a table using massive ORM . I need to get list of unique studentname from table 'Student' that has columns ID,StudentName,Age . ID is the primary key.

Note : executing raw query using Query() is not what is needed.

도움이 되었습니까?

해결책

What about this:

dynamic studentTable = new Students();
var students = studentTable.All(columns: "distinct StudentName");

다른 팁

create non-clustered index on studentname column and then try this query

select distinct StudentName from Student
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top