efpocoadapter

DataContractSerializer: How to serialize classes/members without DataContract/DataMember attributes

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...

Entity Framework Foreign Key (or lack thereof)

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) {...

EFPocoAdapter -- PopulatePocoEntity has null PocoEntity...

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 ...

Can't do projections to Persistence Ignorance (POCO) class using EFPocoAdapter

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 ...

"Metadata information not found" while using EF4's POCO Template?

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...

Can I get a POCO from EF4's function import?

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...