Facebook Twitter

Data Binding and Tooltips in Silverlight - WiredPrairie. Jeffhandley/RIAServicesValidation - GitHub. How SubmitChanges works in .NET RIA Servies - Fredrik Normén. Now I’m back from my 4 week long vacation.

How SubmitChanges works in .NET RIA Servies - Fredrik Normén

I have spend a lot of time with my new apartment, took about 2 month to get most of it ready, I still have a lot of things to do, but all the painting and stuff are done :) I got a question on my e-mail regarding .NET RIA Services and the Business Application project’s UserRegistartionService. It was about the AddUser method in the Service and when and where it’s called. I thought it would be great to write a post about it. Something that is good to have in mind is that the .NET RIA Services is all about code generation. The Business layer we are creating by following the .NET RIA Service business layer pattern and guide lines, will be used to generate proxy classes on the client-side to help us communicate to the server in a easy way. Note: This post is based on the July Preview of the .NET RIA Services, and I also assume you have some basic knowledge about the .Net RIA Services.

RIA Services Validation: ViewModel Validation with Entity Rules. For those of you familiar with the ViewModel (or MVVM) pattern, you are likely also familiar with a typical pain point regarding validation: you often need to duplicate your entity validation metadata onto your ViewModel classes.

RIA Services Validation: ViewModel Validation with Entity Rules

This can lead to burdensome dual maintenance of your validation rules, and it can seem very frustrating that with the server to client metadata propagation that RIA Services offers, your ViewModel classes are left dangling out there for you to manage yourself. In this post, I’ll illustrate a utility I created that allows a ViewModel to assume validation metadata from model classes or properties, eliminating the dual maintenance. ModelPropertyValidator Virtually every ViewModel will have properties that actually represent properties from your model.

Let’s use the meeting invitation model from earlier RIA Services Validation posts as an example. Here’s a subset of the Meeting class with its data annotations in my Web project: Code Snippet ModelObjectValidator. Get Started with WCF RIA Services. Getting Started Walking Through a Silverlight Application Take a tour of the XAML and Javascript generated by an application template that's installed with the Silverlight SDK. Organizing XAML Assets Learn how to organize XAML assets in Expression Design and Expression Blend to maximize developer efficiency. Hosting HTML Content This video demonstrates various ways you can use existing HTML content within your Silverlight application including full pages, fragments, or syndicated content. Understanding Mouse Input Learn about Mouse input and how to use some of the mouse functionality available in Silverlight. WCF RIA Services and a guide to use DTO/”Presentation Model” - Fredrik Normén.

NOTE: Examples in this blog post is based on the VS 2010 Beta 2, WCF RIA Services PDC Beta, some changes to the WCF RIA Services can happen until RTM.

WCF RIA Services and a guide to use DTO/”Presentation Model” - Fredrik Normén

I have seen several questions and request about how to use Data Transfer Objects (DTO), or a ”Presentation Model” (Model created for presentation purpose) with WCF RIA Services. In this post I will write something about it. Why use DTO/”Presentation Model”? Why use DTO/”Presentation Model” at all? Well, domain entities aren’t design with presentation in mind; they are design to solve business problems. CL09.pptx. Setting up Silverlight, RIA Services, NHibernate and Validators. Unzip all of these in 1 dedicated empty folder: Introduction RIA Services is a rather new kid on the block, and because of that it is pretty hard to find relevant information and code samples about how to set up a proper environment for building business applications around it (which is probably the main intent for the whole framework).

Setting up Silverlight, RIA Services, NHibernate and Validators

Even more so if on your previous projects you got hooked on NHibernate and all the powerful things and tools around it and just HAVE to have all that in it. One of RIA's key points was it's data source agnostic approach, which basically meant you can hook up practically anything as a data source. Which is basically true. The Validation Issue One of the key issues I wanted to address is the validation pipeline.

The focus of the sample is on CalorieCount and Description properties. Public class Plate { [NotNull] [Required] [Range(0, 10000)] public virtual int? This is also one of the biggest reasons I don't like using attributes. Combining the Validation. RIA Services Validation: Standard Validators. RIA Services offers powerful features for flowing validation from your entity model all the way up to the Silverlight UI.

RIA Services Validation: Standard Validators

In fact, flowing your validation rules from the server into your form controls was one of the primary tenets of RIA Services V1, and our team did the work of getting validation integrated deeply into Silverlight, long before RIA Services was released. In this post we’ll take a look at the standard validators that are offered. System.ComponentModel.DataAnnotations.ValidationAttribute RIA Services employs the ValidationAttribute class from System.ComponentModel.DataAnnotations for defining validation rules on your entity model. ValidationAttribute itself is abstract (VB: MustInherit) but any class that derives from ValidationAttribute will be treated as a “validator.” These four validators alone will cover a great deal of your validation scenarios. Using System;