c# - Which entity types need Controllers generated for Web API OData Entity Framework solution? -


i have model first entity framework project. contains enums, complex types, , 1:1 relationships inherited types.

example: have coupon type. coupon has either single fixedoff or percentoff entity (inherited base of valueoffbase).

question: need add controller abstract base class? or each of concreate descendent classes?

i have ef complex type called daterange has start , stop date. add controllers too?

if mean add odatacontroller, think needn't add controller abstract base class. fact, odata controller follows name convention as:

public class {entitysetname}controller : odatacontroller { ... } 

same daterange.

i suggest can use attribute routing. can use class name create controller. here introduction of attribute routing.


Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

clojure - 'get' replacement that throws exception on not found? -