Extend properties on Entity/Association/Property
Extend properties on Entity/Association/Property
Good evening,
Is it possible to add properties to an Entity (LinqClass) / Association (MsLinqAssociation) / Property (LinqProperty) ?
I'm just evaluating EntityDeveloper to see if we could use it to replace our current CodeGenerator. It looks promising, we would be using our own T4-templates but need extra information from the above mentioned types, is it possible to extend them and if that's possbile how would I go about doing that?
kind regards,
Jurjen de Groot
Netherlands.
Is it possible to add properties to an Entity (LinqClass) / Association (MsLinqAssociation) / Property (LinqProperty) ?
I'm just evaluating EntityDeveloper to see if we could use it to replace our current CodeGenerator. It looks promising, we would be using our own T4-templates but need extra information from the above mentioned types, is it possible to extend them and if that's possbile how would I go about doing that?
kind regards,
Jurjen de Groot
Netherlands.
Re: Extend properties on Entity/Association/Property
You can extend an existing object model with Extended Properties: http://www.devart.com/entitydeveloper/e ... eloper.chm (do Properties > Unblock if content is not displayed) > Template System Concepts > Declaring Extended Properties in Templates.Jurjen wrote:Is it possible to add properties to an Entity (LinqClass) / Association (MsLinqAssociation) / Property (LinqProperty) ?
Refer to the existing templates for examples how to define and use extended properties.
Be aware that Entity Developer code generator system is based on its own object model. You can create your own (or modify existing) templates for using them in Entity Developer. Its engine uses T4-like template language: https://www.devart.com/entitydeveloper/ ... ation.html.Jurjen wrote:we would be using our own T4-templates but need extra information from the above mentioned types, is it possible to extend them and if that's possbile how would I go about doing that?
Our documentation doesn't include reference for classes used in the templates, but there are some tips:
* use IntelliSense feature in our T4 Editor (completion list appears when you type the '.' character)
* you can switch to the model in design time to read a description of a particular property in the Properties window
* general T4 reference: http://msdn.microsoft.com/en-us/library/bb126478.aspx
* decompiling C:\Program Files (x86)\Common Files\Devart\EntityDeveloper\EntityDeveloper.Common.dll and C:\Program Files (x86)\Common Files\Devart\EntityDeveloper\EntityDeveloper.Orm.Common.dll may help you to get acquainted with the needed classes and their functionality
Re: Extend properties on Entity/Association/Property
That was pretty easy to do, those extended properties
Is 't possible to create extended properties using other types than just System.Int32, System.string, .... ?
I would like to add a property to set the DatabaseType of the entity-property so field Id is D_ID, or field Status is D_ENUM etc. (As used in Firebird DB) ... so I'd like to be able to select the domain from a list within the property-grid, currently I'd have to type this manually for each property.
Is something like that possible ?
Is 't possible to create extended properties using other types than just System.Int32, System.string, .... ?
I would like to add a property to set the DatabaseType of the entity-property so field Id is D_ID, or field Status is D_ENUM etc. (As used in Firebird DB) ... so I'd like to be able to select the domain from a list within the property-grid, currently I'd have to type this manually for each property.
Is something like that possible ?
Re: Extend properties on Entity/Association/Property
Yes, it is.Jurjen wrote:Is 't possible to create extended properties using other types than just System.Int32, System.string, .... ?
For this, you should:
1) place an assembly with the required type either to GAC or to C:\Program Files (x86)\Devart\EntityDeveloper\
2) specify Type.AssemblyQualifiedName, e.g.:
System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Re: Extend properties on Entity/Association/Property
Shalex,
1. I've created an assembly with a type and put the dll in the specified folder.
Step 2 isn't clear to me. I've tried adding the assembly in the ModelSettings Windows under Attributes but I'm not clear as to where I should add the type with FullyQualified name. I've tried the refresh button but that doesn't seem to do anything. Should I create my custom 'types' in another fashion in my assembly ?
Could you clarify that for me ?
thanks,
Jurjen.
1. I've created an assembly with a type and put the dll in the specified folder.
Step 2 isn't clear to me. I've tried adding the assembly in the ModelSettings Windows under Attributes but I'm not clear as to where I should add the type with FullyQualified name. I've tried the refresh button but that doesn't seem to do anything. Should I create my custom 'types' in another fashion in my assembly ?
Could you clarify that for me ?
thanks,
Jurjen.
Re: Extend properties on Entity/Association/Property
Please navigate to Model Settings > Model > Extended Properties, select the type of extended property and press Add. Now specify Type.AssemblyQualifiedName in the Property Type field.
Re: Extend properties on Entity/Association/Property
Hi Shalex,
I've been very busy the last few weeks, today I had some time but at this time the trial has expired, is there any way to extend the trial with a week or two?
Jurjen.
I've been very busy the last few weeks, today I had some time but at this time the trial has expired, is there any way to extend the trial with a week or two?
Jurjen.
Re: Extend properties on Entity/Association/Property
We have just sent the extended trial to the email specified in your forum profile.
Re: Extend properties on Entity/Association/Property
Got it!
Thank you!
Thank you!