Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 76b0ced

Browse files
committed
Add OrmliteConfig.OnModelDefinitionInit
1 parent 1ab3479 commit 76b0ced

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ServiceStack.OrmLite/ModelDefinition.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ public void AfterInit()
167167
var allItems = new List<FieldDefinition>(FieldDefinitions);
168168
allItems.AddRange(IgnoredFieldDefinitions);
169169
AllFieldDefinitionsArray = allItems.ToArray();
170+
171+
OrmLiteConfig.OnModelDefinitionInit?.Invoke(this);
170172
}
171173

172174
public bool IsRefField(FieldDefinition fieldDef)

src/ServiceStack.OrmLite/OrmLiteConfig.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,5 +197,7 @@ public static IOrmLiteExecFilter ExecFilter
197197
public static bool SkipForeignKeys { get; set; }
198198

199199
public static Func<string, string> ParamNameFilter { get; set; }
200+
201+
public static Action<ModelDefinition> OnModelDefinitionInit { get; set; }
200202
}
201203
}

0 commit comments

Comments
 (0)