wcf-ria-services

WCF RIA Services / ChangeSet Complete

南笙酒味 提交于 2019-12-11 06:49:44
问题 I have a business requirement that needs to be executed after all the WCF RIA services changes have been implemented on the server side, but before WCF RIA Services sends data back to the client. I realize that I could easily add the logic on the client, after a save has been completed. However, I would rather avoid the round-trip back to the server. Is there an interception point for this on the server? 回答1: Take a look at this http://weblogs.asp.net/fredriknormen/archive/2009/12/29/wcf-ria

How to make synchronous RIA request

你说的曾经没有我的故事 提交于 2019-12-11 05:42:22
问题 I have an existing RIA service in which I would like to include a very simple call to find the maximum fields allowed for a certain custom object. The value will change infrequently, if ever, and I would like to call it just once when needed and then keep it on the client. However, when I need to know the value, I need to know it in a synchronous manner, as I will be using it right away. I've tried the following, but the .Value is always just 0, since the service doesn't actually make the

Is there a way to selectively skip silverlight field validation when using wcf ria?

拟墨画扇 提交于 2019-12-11 02:06:48
问题 I have a (likely common) case where I would like to reuse the same class for both adding a new entity and editing an existing entity in my silverlight app (SL4, WCF RIA, EF4, Linq-to-Entities). When adding a new one, I would like my custom validator to check for uniqueness and fail if it's not unique. However, when editing, I don't want that same validator to prevent edits. Is there a way to temporarily turn off validation for a single field (ideally by validation type so that the other

Loading WCF RIA Services Query results to an ObservableCollection

☆樱花仙子☆ 提交于 2019-12-10 22:17:14
问题 In my Silverlight app, after creating ADO.NET Entity Data Model and WCF RIA Services Domain Service Class, in a corresponding ProductService class I have a query operation that returns a collection of Product entities to the client, as follows: public IQueryable<Product> GetProducts() { return this.ObjectContext.Products; } Now I'm trying to read it in the client Silverlight app and load results to an ObservableCollection: ProductContext pcontext = new ProductContext(); ObservableCollection

Can a DomainService return a single custom type?

空扰寡人 提交于 2019-12-10 19:09:09
问题 I would like a method on my in my domain service similar to: public SystemState GetSystemStatus() { return new SystemStatus { InterestingStatusValue1 = 1223, OtherInterstingStatusValue = "abc", } } That doesn't work. Nothing is auto-generated for the Silverlight client app. Howerver if I make this an IQueryable method, then I get something generated on the client. I'll get a SystemStates property and a Query method on the context object. Is there no way to make this a simple WCF call? I

Datagrid doesn't refresh on changed data

。_饼干妹妹 提交于 2019-12-10 17:48:07
问题 Is there any way to have a datagrid listen to the database and automatically update the data if the database data is changed? I use a SQL Server database. I'd like to use Linq-2-SQL if possible 回答1: Because @Slaggg asked: there are fairly straightforward ways of doing this, but they're almost certainly going to involve a lot of coding, it'll impact performance pretty significantly, and my strong suspicion is that it'll be more trouble than it's worth. That said, for a typical n-tier

How do I do client-side validation in WPF using WCF RIA Services

…衆ロ難τιáo~ 提交于 2019-12-10 16:41:35
问题 I've created a WCF RIA Service that I'd like to use with a WPF application. I've added several System.ComponentModel.DataAnnotations validation rules on the entities meta-data, all which work great on the server when I call .SubmitChanges(changeSet) from the client. I'd also like to validate my entities on the client side before I sumbit my changes to the server but I have no idea how to do so. Any help in this regard would be greatly appreciated! Thanks.... 回答1: As far as I know, there is no

Can I use RIA Services with Entity Framework 4.3?

安稳与你 提交于 2019-12-10 16:13:14
问题 This is my setup: MVC app A domain model with a data access layer using Enitity Framework Code First Silverlight application (displayed in the MVC App) I'm using RIA Service to make the Silverlight App interact with the DB. Ria services only supports entity framework 4.1 as of now. Current release is 4.3. Seems to be a waste to not get the new features of EF (like migrations and hopefully enum support in the future) just becouse of the Ria service for the Silverlight app. My question is

silverlight The type exists in both and DataContractSurrogates

只愿长相守 提交于 2019-12-10 15:23:00
问题 I'm using silverlight 4 with ria serivces .. I got an error said : The type 'eLab.Web.SessionsHWFile' exists in both 'eLab.Web.dll' and 'DataContractSurrogates_c96b3601-cd13-4049-93bb-e7b3f59a4fd9' where eLab.Web is the aspx web project that hosts the silverlight project, and SessionsHWFile is an edmx entity ,it's not a real table in DB, it's VIEW. I dragged a grid from the data source and doped it in XAML user control, and used a query to get the data from stored procedure in DB, but I'm

WCF-RIA Services Client OutputCache - not working in IE with localhost

无人久伴 提交于 2019-12-10 13:45:13
问题 We are using the WCF-RIA Services in our project. On part is a search which will trigger a RIA request on the server. For this request we have enabled the Client output cache using this attribute: [OutputCache(OutputCacheLocation.Client, duration: 2 * 60)] We want to use the client cache, because the information to be cached are user specific. The problem ist, that the cache works fine in Firefox and IE after the application is installed in an IIS, but while debugging IE seems to ignore the