entityset

What makes a LINQ Association an EntitySet<table>?

I just finished using Linq to Sql to map our existing Database structure for use in a Thick Client app. While writing some Linq Methods to replace some Stored Procedures I noticed that sometimes I could do tblOne.tblTwo.MyDesiredField. I learned that there needed to be an association in the dbml for that to work. Well mine was missi...

Generic List to EntitySet Conversion

How do I Convert a System.Collections.Generic.List<T> to a System.Data.Linq.EntitySet<T> ? ...

observableCollection to EntitySet

How do I assign a observableCollection<T> into a EntitySet<T> ? ...

Entity Framework conditional mapping operator other than = and is

Is it possible to create an EntitySet with a conditional mapping other than Value or IsNull? Suppose we have have a Product object with a field DateTime Expiration. I want to have ExpiredProducts and ActiveProducts based on Expiration>DateTime.Now so I can query like this: var expired = from p in ExpiredProducts select p; ...

What is the best ViewModel Collection for WCF RIA Services?

Hi, I'm currently creating an registration application that will register records into different entities in my database. The whole solution is built in SL4, MVVM, Entity Framework and using WCF RIA Services. I have a heap of different views and viewmodels, all containing different types of input controls and bound controls (textboxes, ...

Serialize EntitySet through net remoting

Hi Everyone, I have a shared object through net remoting. The problem is that this object has some EntitySet and EntityRef attributes. When I try to run the program I get an exception telling me that EntitySet is not marked as Serializable. If I mark it as Serializable everything seems to be ok, but when I try to access from outsied to...

Reverting changes to an EntitySet<T> in Linq-to-SQL

I have a Linq-to-SQL context with changes in an EntitySet. I want to get rid of all the changes I made to it since I last called SubmitChanges(). I use the following method to revert the state of the context: public static void RevertChanges(this DataContext context) { var changeSet = context.GetChangeSet(); var inserts = change...

binding EntitySet to DataGrid in WPF

hi there Whats the ideal way to bind a EntitySet to a DataGrid? I use VS2010 and the .NET 4.0 Framework. The item in the class bound to the DataContext of my form does have the following property: public EntitySet<MyObject> objectsToBind { get { return context.MyObjects; } set { context.MyObjects= value; } } Any help or hints gr...