In Nerd Dinner's Entity Framework repository, the queries' return type corresponds to the model and not to the EF conceptual entity.
public IQueryable<Dinner> FindAllDinners()
{
return db.Dinners;
}
...
public ObjectSet<Dinner> Dinners // NerdDinner.Designer.cs, line 76
The type of Dinner is NerdDinner.Models.Dinner.
I noticed the namespace for NerdDinner.Designer.cs is the same as the namespace for the model (NerdDinner.Models). I am assuming it pulled this namespace because it's sitting in the Models folder.
Question:
Can someone confirm that the return type of the EF queries is driven by the namespace of the EF config and that the namespace of the EF config is decided by the physical location of the EF files?
What options are available to make this technique work if the namespaces/locations are different and Code First CTP is not an option? Is this specific namespace configurable?