c# - Mapping stored procedures in EF 6 to abstract types -


my data model uses inheritance (which i'm trying change...) looks like:

abstract class entity  {     public int foo { get; set; } }  class derived1 : entity {     public int widgetcount { get; set; } }  class derived2 : entity {     public int barcount { get; set; } } 

i retrieve results of query (or stored proc) returns entity, .executestorecommand<t> .translate<t> , .sqlquery<t> fail because can't create entities, yet query against dbcontext's dbset<entity> works , returns objects of correct type (either derived1 or derived2).

is there way me query entities without using dbset?


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -