asp.net - How to Declare servicestack RestService with list of objects? -


i need pass multiple objects application rest service using servicestack. need this

eventlogservice : restservicebase<list<eventlogdata>> 

it not giving build error. name of operation listed "list`1" instead of name given.
have line of code declare apphost()

public apphost() : base("rest wcf", typeof(eventlogservice).assembly) { } 

your apphost used register all services, not 1 of them. servicestack scan through , register services defined in assembly: typeof(eventlogservice).assembly. likewise "rest wcf" name doesn't refer single web service, it's refers of them , used on autogenerated metadata pages.

you should have request dto each of services, if want pass in list<eventlogdata> can with:

 public class eventlogs : list<eventlogdata> {} 

or

 public class eventlogs {      public list<eventlogdata> items { get; set; }  } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -