问题
I've been trying to figure out a good and easy way to send the results of a MySQL Query over my Web Service.
There is a lot of good methods that I've looked into, like Data Transfer Object, but I would like to keep it as simple as possible. At this point simply getting this to work has a higher priority. :)
Any help or documentation is welcome, even on more difficult topics, but as mentioned above the simpler the better at this point.
回答1:
when you say expose your results, do you also mean dynamic querying? such as Wcf Data Services
However be careful on what and how you expose information. It is a pain to go back and fix it.
for SOA or a 3 physical Tier I would consider using
- Service Layer
- Data transfer objects, they are great, exposing data directly can cause issues with maintainability/Changeability
to help with DTO's look at AutoMapper, it was designed for it.
if I have missed a point, add a comment
ps here is a great list of helpful patterns PoEAA Catalogue
来源:https://stackoverflow.com/questions/4137605/a-good-way-to-send-the-results-from-a-mysql-query-over-a-web-service