default values in constructor

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
travis_thelen
Posts: 17
Joined: Thu 14 Mar 2013 15:39

default values in constructor

Post by travis_thelen » Thu 22 Aug 2013 18:18

My oracle database uses lower(sys_guid()) as the default for PK columns.

The generated class has the following:

public ADMIN_CUSTOMER()
{
this.ACUST_GUID = @"lower(sys_guid())";
}

I would like it to generate the following:

public ADMIN_CUSTOMER()
{
this.ACUST_GUID = Guid.NewGuid().ToString("N").ToLower();
}

Is this possible?

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: default values in constructor

Post by Shalex » Tue 27 Aug 2013 14:57

ACUST_GUID is an Entity Key property of your ADMIN_CUSTOMER class, isn't it? In this case, you should copy a predefined template to the model folder (via Model Explorer) and modify the template manually to make it generate "this.ACUST_GUID = Guid.NewGuid().ToString("N").ToLower();".

Post Reply