servicestack

Recommended ServiceStack API Structure

丶灬走出姿态 提交于 2019-11-26 00:45:47
问题 I\'m trying work out the best way to structure our API; we have Reviews which we\'ve setup in a standard REST structure (list one, list all, create, update etc). Where it doesn\'t quite fit the examples is: each review can be linked to one or more other types e.g. Event, Location or Thing. My thinking is the urls would be along the lines of: /event/reviews/ (or the reverse of this e.g. /reviews/event/) /location/reviews/ /thing/reviews/ The issue I can see however is the \"GET\" for each of

How to merge multiple assemblies into one?

人盡茶涼 提交于 2019-11-26 00:32:45
问题 I consuming my service stack using EXE project (startup task for azure application) in that I have copied following service stack\'s DLL & some Azure\'s DLLs in to EXE project. When I build this EXE project then Azure DLLs will be bundled with my EXE but service stack\'s DLL will not be bundled with EXE, because to run my EXE on any machine I need to copy all service stack\'s DLL manually. I have used this service stack\'s dll to use JsonServiceClient client = new JsonServiceClient

Getting ServiceStack to retain type information

邮差的信 提交于 2019-11-26 00:15:53
问题 I\'m using ServiceStack to serialize and deserialize some objects to JSON. Consider this example: public class Container { public Animal Animal { get; set; } } public class Animal { } public class Dog : Animal { public void Speak() { Console.WriteLine(\"Woof!\"); } } var container = new Container { Animal = new Dog() }; var json = JsonSerializer.SerializeToString(container); var container2 = JsonSerializer.DeserializeFromString<Container>(json); ((Dog)container.Animal).Speak(); //Works ((Dog