DataContractSerializer requires classes and members to be marked with the DataContract and DataMember attributes. However, in my case the classes are auto-generated with the EFPocoAdapater framework and these attributes are not present.
How can I force serialization of all members using the DataContractSerializer without these attribut...
So I have pouring of this code forever, trying to figure this out... I am using Entity Framework 1.0 with ASP.NET MVC in .NET 3.5 SP1 with EFPocoAdapter (so separate Poco classes).
So I have the following code for one of Controllers:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult EditUser(int? id, FormCollection form)
{...
I'm trying EF with the EFPocoAdapter for the first time. I have a relatively simple TPH scenario with one table and two types, each inheriting from an abstract base class.
My model validates through EdmGen, and my PocoAdapter.cs and xxxEntities.cs files generate fine as well. (well, actually, there are some namespace probems that i'm ...
Given a simple POCO class such as:
public class User { public int Id { get; set; } public string Name { get; set; } public string Password { get; set; } }
When I try a query with projection to itself like so:
using (var context = new Context())
{
var user = context.User.Select(u => new User { Id = u.Id }).FirstOrDefault();
}
... I ...
I just installed the POCO Template for EF4. I have a single entity in my model, AnnouncementText, and the T4 files seem to be properly generated. Attempting to access this new entity is throwing the following error when I access the auto-generated property MyObjectContext.AnnouncementTexts:
InvalidOperationException: Mapping and me...
In the context of Entity Framework 4, the default behavior when adding a function import is to call it via ExecuteFunction<T>(), where T must apparently implement some property change notification stuff. (In my case it's generating a complex type derived from ComplexObject.)
I don't need or want any change notifications, and I'm requir...