So I’ve started using OData in anger and pretty much immediately stumbled on a problem when using Data Transfer Objects (DTOs). This post explains that problem and the solution.
The following error is encountered when trying to access the exposed entity by key:
No routing convention was found to select an action for the OData path with template '~/entityset/key'.","type":""
Here I show the simple entity I’m exposing
Here you can see that the underlying timesheets are just projected using Automapper to their DTO counterparts
Here I show the automapper configuration (not that it’s makes any difference to the problem encountered)
To fix this problem I needed to set the EntityType.Name property on my OData entity type.
And thereafter, success!
If you ever come across the problem of the IntelliJ Application Servers menu greyed out like this:
This is simply because you need at least one Run Configuration.
I’m using JBoss just now so here’s what I do to add a run config:
Once this is done you can now see your application servers tools window menu item becomes enabled.