Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Partial class declaration errors
Message
 
To
03/06/2012 22:07:43
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01531602
Message ID:
01545248
Views:
56
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform