摘要:
理解领域服务和领域操作本文目录:3.1 WCF Ria Services简介3.1.1 什么是WCF Ria Services3.1.2 WCF Ria Services如何生成客户端代码3.1.3 如何使用WCF Ria Services3.2 实战WCF Ria Services开发3.2.1 使用Silverlight业务应用程序项目模板3.2.2 使用Entity Framework创建数据访问层3.3 创建领域操作3.3.1 查询操作3.3.2 查询操作命名惯例3.3.3 插入、更新、删除操作命名惯例3.3.4 调用操作3.3.5 自定义操作要使用Silverlight开发企业级的应 阅读全文
posted @ 2011-09-13 16:45
Areas
阅读(413)
评论(0)
推荐(0)
摘要:
图片无法序列化后传输,但我们可以将图片转二进制字符串传输。然后在服务端将二进制字符串转图片。将图片转字符串的例子: private byte[] BmpToJpegBuff(Image img) { ImageConverter converter = new ImageConverter(); byte[] bmpSrc = (byte[])converter.ConvertTo(img, typeof(byte[])); MemoryStream ms = new MemoryStream(bmpSrc); MemoryStream msjpg = ... 阅读全文
posted @ 2011-09-13 15:15
Areas
阅读(645)
评论(0)
推荐(0)
摘要:
大多數接觸Silverlight程式開發的人只要有需要對後端Server作呼叫應該都會遇到一個問題,那就是所有的呼叫都是非同步機制,而沒有任何同步的方式,這個問題的主因在於Web機制上的問題,MSDN論壇中有很多篇已討論此問題且有介紹原因,但不幸的受限於底層.在Silverlight SDK中要做到同步會有些考量因素我想未來應該也很難加入,本篇文章在於如何解決這些問題.由於Silverlight呼叫並不能同步呼叫所以必須找到一些方式來處理,熟悉MultiThread設計的人第一個想到的就是透過dotNet的Thread同步機制來處理,譬如說Thread.Join或AutoEvent等方式.但一 阅读全文
posted @ 2011-09-13 10:20
Areas
阅读(349)
评论(0)
推荐(0)
摘要:
This is the first part of a two-part series on working with collections in WCF RIA Services.IntroductionA lot of business applications today are built with WCF RIA Services (which should come as no surprise, as it’s a really powerful, extensible framework). However, the collection type support could 阅读全文
posted @ 2011-09-13 10:16
Areas
阅读(241)
评论(0)
推荐(0)
摘要:
This is the second part of a two-part series on working with collections in WCF RIA Services.In thefirst part of the article series, we’ve learned about the simpler collection types: EntitySet and EntityList. In this part, we’ll dig deeper into the more advanced types: the ICollectionView and the Do 阅读全文
posted @ 2011-09-13 10:16
Areas
阅读(302)
评论(0)
推荐(0)
摘要:
WCF Service(WebService)Web Services是经实践考验证明的跨防火墙的通信方式,它很稳定且被广泛认可。总的来说你需要为分散的CRUD操作指定相应的接口并在Silverlight中忠实的调用他们使用的原因:需要进行类似直接通过服务进行数据库交互操作的项目(弱化业务逻辑部分)。避免使用的原因:必须始终自己监视数据的变化并调用相应的服务方法进行更新,任何需要并发的操作或事务变得较为沉重且需要处理大量的代码。ADO.NET Data ServicesADO.NET Data Services是一套简单的基于Rest的数据通信方式。它依赖于Http定义服务接口,如Get操作定 阅读全文
posted @ 2011-09-13 10:12
Areas
阅读(181)
评论(0)
推荐(0)
浙公网安备 33010602011771号