I´ve been pushing for it a while ago but it got not enough response so I rolled my own
cause I want a clean separation between BL and PL nice sideeffect is no need of ORMSupport in my PL..
any addition are welcome ...
Frans how do I get the meta data of the data fields e.g. max length of strings etc. in the TDL Template?
As I want to add it as Attributes to my Interface generated with the attached template..
Goal is to have complete technology agnostic representation of the data model.
It´s VB but you should be able to convert it in a breeze.. btw. C# supports partial interfaces VB does not for what reason I don´t know but in C# you can do you code organisation by generating the data model interface and add additional custom interfaces via partial interface in different files (no worries about separation of generated and written code)
' ////////////////////////////////////////////////////////////////////////////////////////////////////////
' // This is generated code.
' ////////////////////////////////////////////////////////////////////////////////////////////////////////
' // Code is generated using LLBLGen Pro version: <[LLBLGenVersion]>
' // Code is generated on: <[Time]>
' // Code is generated using templates: <[TemplateName]>
' // Templates version: <[TemplateVersion]>
' ////////////////////////////////////////////////////////////////////////////////////////////////////////
''' <summary>
''' Interface for the entity '<[CurrentEntityName]>'.
''' </summary>
'''[DataContract]
Public Interface I<[CurrentEntityName]> <[ If IsSubType ]>
Inherits I<[ SuperTypeName ]> <[ EndIf]>
'[Object Data Member]
<[Foreach RelatedEntity OneToMany CrLf]>
<[If Not MappedFieldRelationIsHidden]>
'1:n
ReadOnly Property <[MappedFieldNameRelation ]>Collection As IList(Of I<[RelatedEntityName]>)
<[EndIf]>
<[NextForeach]>
<[Foreach RelatedEntity ManyToMany CrLf]>
<[If Not MappedFieldRelationIsHidden]>
'm:n
ReadOnly Property <[MappedFieldNameRelation]>Collection As IList(Of I<[RelatedEntityName]>)
<[EndIf]>
<[NextForeach]>
<[Foreach RelatedEntity ManyToOne CrLf]>
<[If Not MappedFieldRelationIsHidden]>
'n:1
Property <[MappedFieldNameRelation]> As I<[RelatedEntityName]>
<[EndIf]>
<[NextForeach]>
<[Foreach RelatedEntity OneToOne CrLf]>
<[If Not MappedFieldRelationIsHidden]>
'1:1
Property <[MappedFieldNameRelation]> As I<[RelatedEntityName]>
<[EndIf]>
<[NextForeach]>
<[Foreach EntityField CrLf]>
'[ Scalar Data Member]
<[If IsPrimaryKey ]><[ If IsSubType ]>Shadows <[ EndIf ]><[ EndIf ]>Property <[EntityFieldName]> As <[If IsNullable]><[If IsValueType]>Nullable(Of <[TypeOfField]>)<[Else]><[TypeOfField]><[EndIf]><[Else]><[TypeOfField]><[EndIf]>
<[NextForeach]>
'Validation Interface
<[ If IsSubType ]>Shadows <[ EndIf ]>Function Validate() As Boolean
<[ If IsSubType ]>Shadows <[ EndIf ]>ReadOnly Property ValidationErrors As IList(Of System.String)
End Interface