How to list all entity names / table names from your Entity Framework model in Silverlight 4 and RIA services

If you want to list all entity names / table names from your Entity Framework model (*.edmx) in Silverlight 4, use a RIA Invoke operation:   using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.Metadata.Edm; using System.ServiceModel.DomainServices.Server; namespace Research.Web { public partial class ResearchDomainService { /// <summary> /// Get …

Solving: DisplayName not showing in a DataForm in Silverlight 4 by using data annotations on a metadata class.

I was trying to change the displayname of a field in a dataform by placing the DisplayName attribute on the property in the metadata class. This will not work instead you must use the [Display(Name= "This is the correct display name")] attribute on the field in a metadata class: [MetadataTypeAttribute(typeof(Product.ProductMetadata))] …

Solving: The attachable property ‘Behaviors’ was not found in type ‘Interaction’

  I was getting the error: The attachable property ‘Behaviors’ was not found in type ‘Interaction’. This was generated by a missing reference to the "System.Windows.Interactivity" assembly.   You can download the assembly at http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3062 It is contained in the BlendSLSDK_en.msi You can extract the msi package without installing it, …

How to run and debug silverlight unittests inside Microsoft Visual Studio 2010

The Microsoft Test project template in Microsoft Visual Studio 2010 does not support adding a reference to a Silverlight class library. To unittest a function in a Silverlight class library you can follow the steps below:   – Install the Microsoft Silverlight Toolkit April 2010 (http://silverlight.codeplex.com/releases/view/43528) – After installing the …