Print Page | Close Window

How do I add a new entity to Cabana?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=352
Printed Date: 30-Aug-2025 at 1:37am


Topic: How do I add a new entity to Cabana?
Posted By: Linguinut
Subject: How do I add a new entity to Cabana?
Date Posted: 02-Aug-2007 at 1:15pm
I am building a new module.  It is a module that will handle the Persons table in the IdeaBlade Tutorial database.  If I add the Persons table through the ORM, the Person class is generated just fine.  I build the Cabana.Model project, then try to configure databindings on a controlbindingmanager on a view in my new module.  I select Cabana.Model from the list and all of the types show up...except Person.  Is there something else that I need to do in Cabana in order for the new entity type to show up?
 
Bill



Replies:
Posted By: Linguinut
Date Posted: 02-Aug-2007 at 2:03pm
Criminey!!  One step forward...two steps backward!!  DebuggerDisplays, Deletion Guards, BindingBrowsable, Verification, Validation, Audits, Security Checks . . . none of this is even hinted at in any documentation for Cabana.  Is it assumed that I should know this?  If so, how?  Where can I find documentation of this stuff?  Obviously, I am missing one of these things (or all!) which will allow me to add a simple controlbindingmanager to a view.
 
Deep cleansing breath.  In . . . out . . . slowly.
 
I'm going home.
Bill


Posted By: Linguinut
Date Posted: 03-Aug-2007 at 6:42am
If I add a new entity it gets created with this declaration:
 
public sealed partial class Person : PersonDataRow
 
The examples from the existing entities look like this:
 
public sealed class Employee : EmployeeDataRow
 
Why is the Employee class not marked as partial?  Or, why is the Person class marked as partial?
 
This has nothing to do with the entity being seen in the configure databindings window.  It still doesn't show up.  I am just curious.
 


Posted By: Bill Jensen
Date Posted: 03-Aug-2007 at 9:40am

The problem with new entities not showing up in a binding manager is a well known issue with DevForce (actually a Visual Studio issue).  The solution is to close and re-open the designer window.  If that doesn't work, close and re-open the solution in Visual Studio.

The current version of the DevForce object mapper generates entity classes with the partial keyword.  This is correct behavior.  Perhaps the entities without the partial keyword were generated with an earlier version of DevForce.

 
Bill


Posted By: Linguinut
Date Posted: 03-Aug-2007 at 10:11am
Thanks, Bill.  The entities are showing up.  I appreciate you clearing up the "partial" thing, too.  Makes sense.



Print Page | Close Window