New Posts New Posts RSS Feed: Methods for code generation classes
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Methods for code generation classes

 Post Reply Post Reply
Author
jhoward View Drop Down
Newbie
Newbie
Avatar

Joined: 06-Jun-2011
Location: SoCal
Posts: 5
Post Options Post Options   Quote jhoward Quote  Post ReplyReply Direct Link To This Post Topic: Methods for code generation classes
    Posted: 11-Jul-2012 at 9:15am
I'm writing a custom code generation template and I need to know the the members of the IdeaBlade.EntityModel.Edm.Metadata.EntityOrComplexTypeWrapper class. Where can I find documentation or something that will reveal them? I'm tired of guessing. And not doing well.
 
My immediate objective is to find method or property that will yield the database name of an entity, that is, the table name.
 
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jul-2012 at 9:40am
Hi jhoward,

Try the following,

var entityType = entityOrComplexType as EntityTypeWrapper;
var dbTableName = entityType.DbTableName;

Not sure if you've already known this but we ship our code generation templates source code (BaseDomainModelTemplate, DomainModelTemplate and DomainModelTemplateCodeFirst). They should be located in your DevForce2010 installation folder.
Back to Top
jhoward View Drop Down
Newbie
Newbie
Avatar

Joined: 06-Jun-2011
Location: SoCal
Posts: 5
Post Options Post Options   Quote jhoward Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2012 at 5:35am
Thanks. I finally figured out to add a reference to IdeaBlade.EntityModel.Edm.Metadata.dll to one of my projects. Then I could type in partial class names and let InteliSense lead me to the names and metadata. Which is what we all do all the time. Don't know why I didn't think of it this time.
 
My custom template is working great now! Thanks.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down