Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Partial class declaration errors
Message
 
À
03/06/2012 22:07:43
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01531602
Message ID:
01545248
Vues:
57
Ricardo,

>I just got the same exact error for every entity generated (same options and MM framework version as the original poster).
>
>Was not able to find any duplicate class.
>
>Any help greatly appreciated

When you generate entities with the MM .NET BLG, it creates entity classes (in a partial class file) that should be a subclass of ABusinessEntity:
public partial class OrderEntity : ABusinessEntity
	{
		
	}
The standard Entity Data Model generates the other half of the entity classes that should also be a subclass of ABusinessEntity. If you look in the EntityDataModel.tt file, you should see it contains code that sets the base class of the entities it generates to ABusinessEntity.

I recommend checking out the sample project Order System Business Objects EF CSharp to see how this works. I recommend making sure the second page of the MM .NET BLG has the Entity Object base class set to ABusinessEntity, and making sure you have the correct EntityDataModel.tt file in your project.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform