diff --git a/GenericServices/Internal/Decoders/DecodedEntityClass.cs b/GenericServices/Internal/Decoders/DecodedEntityClass.cs index a591960..4474e2a 100644 --- a/GenericServices/Internal/Decoders/DecodedEntityClass.cs +++ b/GenericServices/Internal/Decoders/DecodedEntityClass.cs @@ -58,7 +58,7 @@ public DecodedEntityClass(Type entityType, DbContext context) " The class must be either be an entity class derived from the GenericServiceDto/Async class."); } - if (efType.IsQueryType) + if (efType.FindPrimaryKey() == null) { //QueryType is read only, so we don't do any further setup EntityStyle = EntityStyles.DbQuery;