Skip to content

Commit 9342780

Browse files
committed
Added sample usage of new helper
1 parent dd4e11f commit 9342780

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

EntityFramework.Reverse.POCO.Generator/Database.tt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,16 @@
323323
{
324324
//if (t.ClassName == "User")
325325
// return ": IdentityUser<int, CustomUserLogin, CustomUserRole, CustomUserClaim>";
326+
327+
// or use the maker class to dynamically build more complex definitions
328+
//var r = new BaseClassMaker("POCO.Sample.Data.MetaModelObject");
329+
//r.AddInterface("POCO.Sample.Data.IObjectWithTableName");
330+
//r.AddInterface("POCO.Sample.Data.IObjectWithId",
331+
// t.Columns.Any(x => x.IsPrimaryKey && !x.IsNullable && x.NameHumanCase.Equals("Id", StringComparison.InvariantCultureIgnoreCase) && x.PropertyType == "long"));
332+
//r.AddInterface("POCO.Sample.Data.IObjectWithUserId",
333+
// t.Columns.Any(x => !x.IsPrimaryKey && !x.IsNullable && x.NameHumanCase.Equals("IdUsera", StringComparison.InvariantCultureIgnoreCase) && x.PropertyType == "long"));
334+
//return r.ToString();
335+
326336
return "";
327337
};
328338

0 commit comments

Comments
 (0)