Mapping JSON response from SQL Server to a single string

旧城冷巷雨未停 提交于 2020-01-15 11:01:41

问题


Im returning a complex object from the sql server as a JSON. But when im mapping to a List of String in dapper, the JSON string is being mapped to more than one string in the list depending upon the JSON length even though in DB i can see only one row for the result. So im having to append all the strings in the list and then deserialize the JSON to a object. I know it doesn't make a huge difference in terms of performance but why should i append all the string when i can directly deserialize. So is there a way to get the JSON result in a single string?

来源:https://stackoverflow.com/questions/53846502/mapping-json-response-from-sql-server-to-a-single-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!