I don't really understand how the NopModel.edmx communicates with the entity classes created in the NopSolutions.NopCommerce.BusinessLogic namespace i.e how these classes map to their respective tables in the database. I know the procedure of creating an entity data model that generates classes from the database objects or tables, but I don't know the magic behind the creation of the NopModel.
Please I really need a quick help to this problem of mine to understand the concept behind it. Very many thanks in advance to anyone or evryone that helps me out.
I don't really understand how the NopModel.edmx communicates with the entity classes created in the NopSolutions.NopCommerce.BusinessLogic namespace i.e how these classes map to their respective tables in the database. I know the procedure of creating an entity data model that generates classes from the database objects or tables, but I don't know the magic behind the creation of the NopModel.
Please I really need a quick help to this problem of mine to understand the concept behind it. Very many thanks in advance to anyone or evryone that helps me out.
NopObjectContext.ObjectSets.tt is a text transformation file that generates (automagically) NopObjectContext.ObjectSets.cs
That is what ends up mapping the things in the Model with your Implementations. If you create a new namespace make sure it is included at the top of the .tt file (where the other using statements are)
Other than that you shouldn't need to do anything to the text template. As long as the class is in the model and in the BusinessLogic it will be mapped. If you having errors with the mapping capitalization matters.
Thanks Ozzied but i really want to get this straight. Are u saying I should add a new item to the project and either select ADO.NET Entity object Generator or the ADO.NET Self-Tracking Entity Generator to create the NopObjectContext class or something to map those implemented classes to the model? Please I need you to be more elaborate on this one. Many thanks