Page 1 of 1

default values in constructor

Posted: Thu 22 Aug 2013 18:18
by travis_thelen
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?

Re: default values in constructor

Posted: Tue 27 Aug 2013 14:57
by Shalex
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();".