The following code prints 2:

new MyEntity();
new MyEntity();
var distinctTypes = Query.All<MyEntity>()
    .Select(it => it.GetType())

It executes sql query with distinct on Id and TypeId:

SELECT COUNT_BIG(*) AS [c01umn] FROM (SELECT DISTINCT [a].[Id], 100 AS [TypeId] FROM [dbo].[MyEntity] [a]) [b];

asked May 22 '19 at 06:41

Platonov's gravatar image


One Answer:


Yep. This is not correct. Thank you for the report. I have added an issue for that

answered Sep 17 '19 at 05:30

Alexey%20Kulakov's gravatar image

Alexey Kulakov

edited Sep 17 '19 at 05:30

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: May 22 '19 at 06:41

Seen: 13,811 times

Last updated: Sep 17 '19 at 05:30

powered by OSQA