wcf - Is it possible to set a default operation when setting up a service route -


i'm evaluating setting rest system using wcf against using mvc (which have). i've got running able replicate functionality mvc.

that is, need able specify wcf equivalent of 'default action'. whilst service route has defaults property, i've not found docs on set in here (assuming used in wcf).

the next step, can see, write own service host factory , have custom attribute takes me 1 step far (potentially anyway) i'm using autofac di service dependencies.

is default 'operation contract' possible rest on wcf?

creating new project using rest 4.0 template includes following:

[webget(uritemplate = "")] public list<sampleitem> getcollection() {  // todo: replace current implementation return collection of sampleitem instances  return new list<sampleitem>() { new sampleitem() { id = 1, stringvalue = "hello" } }; } 

the /service1/help screen lists following:

uri method                                       description  service @ http://localhost:60888/service1/ 

so default 'action' specified empty uritemplate.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -