从LightSwitch消费外部服务 [英] Consuming external services from LightSwitch

查看:59
本文介绍了从LightSwitch消费外部服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个LightSwitch应用程序,除其他外,它将允许我的团队检查几组服务器的状态。 它们的状态不会经常发生变化,所以我们不需要这样做进行全面监控,只需要一个方便的地方来对服务器进行分组,这样人们就可以在他们感兴趣时看到他们正在发生什么。   

I'm working on a LightSwitch app that, among other things, will allow my team to check the state of several groups of servers.  The status on them won't change very often, so we don't need this to do full blown monitoring, just a convenient place to group the servers so people can see what's going on with them when they are interested.   

它使用SQL Server来处理大多数数据,但是我想要包含一个显示"刷新服务器列表"按钮的按钮。点击后,它会点击一个URL(GET)并解析响应XML。  XML包含组中的服务器列表以及状态信息。
 我可以将它包装在一个返回POCO列表的服务中,如果它可以让事情变得更容易。或者每次表单加载时,或者每天一次(表单加载)或类似的事情,也可能会运行此刷新。  但这可能是
不必要的讨论。

It's using SQL Server for most data, but I want to include a button that says "Refresh Server List" and when clicked it would hit a URL (GET) and parse the response XML.  The XML contains a list of servers in the group, along with state information.   I could wrap that in a service that returns a list of POCOs or something if it makes things easier.  Might also have this refresh run every time a form loads, or once/day (on form load) or something like that.   But that's probably an unnecessary tangent for this discussion.

一旦我得到xml并解析它,我最终会想把它映射到数据并将数据写入数据库,替换或更新旧行。 

Once I get the xml and parse it, I will eventually want to map that to data and write the data to the database, replacing or updating the old rows. 

我一直在研究,并没有看到实现外部非数据库调用的最佳方法是什么样的   任何建议将不胜感激。 谢谢!

I've been researching for a bit and don't see what the best approach for implementing an external, non-database call would look like.    Any advice would be appreciated.  Thanks!

 

推荐答案

在我看来,RIA服务是最好的方式。   ;只读...... POCO看起来非常适合。
RIA service would be the best way in my opinion.   Read only ... POCO this seems perfectly suited for that.


这篇关于从LightSwitch消费外部服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆