WPF 可执行文件中的自托管 RIA 服务引用 SL RIA 类库
我想在 WPF 中使用 RIA 服务(请在投票结束之前听我说完:))。 我了解了 能够为其他客户端使用 RIA 服务。还查看了使用 DomainServices 的示例程序(著名的 HRApp)使用 RIA 服务工具包从 WPF 中获取。
不幸的是,它们都没有提供我需要的东西(如下所述)。
当我浏览 制作 RIA 服务客户端上下文的演练将领域服务放入可重用的类库中。
我的想法是这样的: 让 SL 类库维护到域服务类库的 RIA 链接。在 WPF 中参考 SL 类库(现在使用我自己的实体扩展进行扩展)。还将 DomainService 作为类库引用,然后使用 自托管我的 WPF 应用程序中的这个技巧。
不幸的是,如果我将 System.Windows.dll 添加到我的 WPF 项目中,代码将无法编译。 (Resharper 还抱怨我也需要添加 System.dll...但这目前看来是误报)。
我的需求是这样的:
- 自行托管一个 WCF 服务,允许我进行 CRUD(无需我编写任何代码)。
- 自托管的 WPF exe 可以接受来自 LAN 内运行的同一可执行文件的实例的连接,只需进行防火墙配置(如果需要)。换句话说,我希望应用程序作为在其他计算机上运行的自己的副本的服务器或独立客户端
- 只需更改程序(或 app.config)内的选项,我就可以连接到不同的实例(用于数据整合)以及服务器上的其他处理)
- 我的应用程序非常简单(最多3个表)。非常简单的查询需求
- 能够使用 ADO.Net 实体模型(和实体)
- 允许我扩展我的实体类,类似于 RIA 提供的
任何关于我的选项的指示将不胜感激。
提前致谢。
I want to use a RIA Services in WPF (Please hear me out before voting to close this :)).
I learned about being able to use RIA Services for other clients. Also looked at the sample progam (the famous HRApp) for consuming DomainServices from WPF using RIA Services Toolkit.
Unfortunately, none of it gave what I needed (explained below).
I was struck by a thought when I was looking through the walkthrough for making the RIA service client context & the domain services into reusable class libraries.
My idea is this:
Have a SL class library maintain a RIA Link to a Domain Service class library. Reference SL Class library (now extended with my own entity extensions) in WPF. Also Reference the DomainService as a class library and then Self-host using this trick inside my WPF app.
Unfortunately, the code is not compiling if I add System.Windows.dll to my WPF project. (Resharper additionaly complains I need to add System.dll too... but that appears at the moment to be a false alarm).
My needs are this:
- Self-host a WCF service that allows me to CRUD (without me writing any code).
- The WPF exe that self-hosts can accept connections from instances of the same executable running within LAN with just firewall configuration (where needed). In other words, I want the application to work as a server for its own copies running on other machines OR a standalone client
- Just by changing a Option inside the program (or app.config) I can connect to a difference instance (for data consolidation and other processing on the server)
- My application is very simple (3 tables at the most). Very simple querying needs
- Be able to use ADO.Net Entity Model (and Entity)
- Allows me to extend my entity classes akin to what RIA offers
Any pointers as to what my options are would be greatly appreciated.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WCF 数据服务(以前称为 ADO.Net 数据服务和 Astoria)正是我所寻找的。它与 RIA 服务非常相似。
它满足4、5、&最重要的是我的需求#6。我只需引用解决#1、#2 的服务程序集即可自行托管。无论如何,我并不是真的在寻找#1 - #3 的答案。
WCF Data Services was (formerly ADO.Net Data Services & Astoria) what I was looking for. It's remarkably similar to RIA Services.
It satisfies 4, 5, & most importantly #6 of my needs. I was able to self host simply by referencing the Service assembly solving #1, #2. I wasn't really looking for answer for #1 - #3 anyway.