	<rss version="2.0">
		<channel>
			<title>LLBLGen Pro Support System Custom Templates feed</title>
			<link>https://llblgen.com/tinyforum//Forum/19</link>
			<description>This is the RSS feed for the forum Custom Templates on the LLBLGen Pro Support System forum system.</description>
			<ttl>30</ttl>
			<language>en-us</language>
				<item>
					<title>Update 5.3 to 5.9  by Otis</title>
					<description>&lt;blockquote&gt;&lt;p class=&quot;quote-nickname&quot;&gt;B  wrote:&lt;/p&gt;&#xA;&lt;p&gt;Using adapter, .net 4.8, &amp;amp; SqlServer22&#xD;&#xA;We have some custom templates and groups that add an intricate security filtering done when loading entities. The templates have references to &lt;code&gt;InheritanceInfoProvider&lt;/code&gt; and since this was moved into the &lt;code&gt;ModelInfoProvider&lt;/code&gt; . Should I modify the references so to something else or do I need new templates and if so where do I find those?&lt;/p&gt;&#xA;&lt;p&gt;The previous creators of this have long gone so I am not sure why something were done the way they were. &lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;The API provided by the InheritanceInfoProvider is now exposed by the ModelInfoProvider, so you can replace &#x27;InheritanceInfoProvider&#x27; with &#x27;ModelInfoProvider&#x27; in your templates. If this doesn&#x27;t solve your question, please provider a snippet of the code (the template) you&#x27;re struggling with so we can explain it better in that context. &lt;/p&gt;&#xA;&lt;p&gt;Also, be sure to read the Migrating your code section of our documentation: &lt;a href=&quot;https://www.llblgen.com/Documentation/5.13/LLBLGen%20Pro%20RTF/migratingcode.htm&quot; rel=&quot;nofollow&quot;&gt;https://www.llblgen.com/Documentation/5.13/LLBLGen%20Pro%20RTF/migratingcode.htm&lt;/a&gt; especially the sections 5.3-&amp;gt;5.4 and up. &lt;/p&gt;&#xA;</description>
					<author>Otis</author>
					<link>https://llblgen.com/tinyforum/Thread/29085#154674</link>
					<pubdate>Wed, 25 Mar 2026 06:50:09 GMT</pubdate>
					<category>Update 5.3 to 5.9 </category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29085#154674</guid>
				</item>
				<item>
					<title>Update 5.3 to 5.9  by B Rightmer</title>
					<description>&lt;p&gt;Using adapter, .net 4.8, &amp;amp; SqlServer22&#xD;&#xA;We have some custom templates and groups that add an intricate security filtering done when loading entities. The templates have references to &lt;code&gt;InheritanceInfoProvider&lt;/code&gt; and since this was moved into the &lt;code&gt;ModelInfoProvider&lt;/code&gt; . Should I modify the references so to something else or do I need new templates and if so where do I find those?&lt;/p&gt;&#xA;&lt;p&gt;The previous creators of this have long gone so I am not sure why something were done the way they were. &lt;/p&gt;&#xA;</description>
					<author>B Rightmer</author>
					<link>https://llblgen.com/tinyforum/Thread/29085#154673</link>
					<pubdate>Tue, 24 Mar 2026 23:12:35 GMT</pubdate>
					<category>Update 5.3 to 5.9 </category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29085#154673</guid>
				</item>
				<item>
					<title>Skip file creation for custom template (lpt) by Otis</title>
					<description>&lt;p&gt;It&#x27;s probably doable with a setting and a preset file. Define a custom setting for entities, then set that setting to true (or to a value) for the entities you want to include in the template execution, then define in the preset file the specific element selection rule. See: &lt;a href=&quot;https://www.llblgen.com/Documentation/5.13/SDK/tasksxmlformat.htm#preset-definition-xml-format&quot; rel=&quot;nofollow&quot;&gt;https://www.llblgen.com/Documentation/5.13/SDK/tasksxmlformat.htm#preset-definition-xml-format&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, &lt;code&gt;&amp;lt;elementSelectionRule isEnabled=&amp;quot;&amp;quot; settingName=&amp;quot;&amp;quot; operator=&amp;quot;&amp;quot; operand=&amp;quot;&amp;quot; targetElementType=&amp;quot;&amp;quot;/&amp;gt;&lt;/code&gt; should be able to get you there. So not via attributes but via settings. &lt;/p&gt;&#xA;&lt;p&gt;An example: &lt;code&gt;&amp;lt;elementSelectionRule isEnabled=&amp;quot;true&amp;quot; settingName=&amp;quot;OutputType&amp;quot; operator=&amp;quot;3&amp;quot; operand=&amp;quot;PocoWithLinqQuery,PocoWithQuerySpecQuery&amp;quot; targetElementType=&amp;quot;8&amp;quot; /&amp;gt;&lt;/code&gt; which selects all typed lists which have the setting &#x27;OutputType&#x27; set to either PocoWithLinqQuery or PocoWithQuerySpecQuery. All other typed lists aren&#x27;t taken into account in that task. See the preset &lt;code&gt;SD.Presets.Adapter.General.preset&lt;/code&gt; &lt;img src=&quot;/tinyforum/pics/emojis/simple_smile.png&quot; class=&quot;emoji&quot; alt=&quot;simple_smile&quot;/&gt; &lt;/p&gt;&#xA;</description>
					<author>Otis</author>
					<link>https://llblgen.com/tinyforum/Thread/29080#154649</link>
					<pubdate>Sat, 14 Mar 2026 07:07:24 GMT</pubdate>
					<category>Skip file creation for custom template (lpt)</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29080#154649</guid>
				</item>
				<item>
					<title>Skip file creation for custom template (lpt) by jovball</title>
					<description>&lt;p&gt;I&#x27;m working on some lpt templates to generate &lt;a href=&quot;https://tim-maes.com/blog/2025/11/07/dotnet-mappers-in-2025/&quot; rel=&quot;nofollow&quot;&gt;Facet DTOs&lt;/a&gt;. Yes, I see the irony in using a code generator to create something used by a source code generator.  &lt;img src=&quot;/tinyforum/pics/emojis/stuck_out_tongue_winking_eye.png&quot; class=&quot;emoji&quot; alt=&quot;stuck_out_tongue_winking_eye&quot;/&gt;&lt;/p&gt;&#xA;&lt;p&gt;My initial template is looking for a FacetModel attribute on the entity and then at FacetInclude or FacetExclude attributes on the entity fields. If the entity does not have the FacetModel attribute, I end up with an empty cs file. I would prefer to skip that file creation. Is there a way for me to do that?&lt;/p&gt;&#xA;</description>
					<author>jovball</author>
					<link>https://llblgen.com/tinyforum/Thread/29080#154644</link>
					<pubdate>Fri, 13 Mar 2026 15:21:51 GMT</pubdate>
					<category>Skip file creation for custom template (lpt)</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29080#154644</guid>
				</item>
				<item>
					<title>Write once fields with EF Core by Otis</title>
					<description>&lt;p&gt;Not sure how many fields you need to do, but one way could be to use a partial class of the generated context and implement the partial method &lt;code&gt;OnModelCreatingComplete(ModelBuilder modelBuilder)&lt;/code&gt;. In there you can use &lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&quot;cs&quot;&gt;modelBuilder.Entity&amp;lt;MyEntity&amp;gt;().Property(t=&amp;gt;t.CreatedBy)&#xA;    .Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;(or a less verbose version, but you got the idea). &lt;/p&gt;&#xA;&lt;p&gt;You can generate this class too if you want of course, if e.g. there are many fields to apply this to. &lt;/p&gt;&#xA;</description>
					<author>Otis</author>
					<link>https://llblgen.com/tinyforum/Thread/29075#154604</link>
					<pubdate>Thu, 19 Feb 2026 07:38:18 GMT</pubdate>
					<category>Write once fields with EF Core</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29075#154604</guid>
				</item>
				<item>
					<title>Write once fields with EF Core by jovball</title>
					<description>&lt;p&gt;I&#x27;m using LLBLGen 5.13. We have some fields that should be write-once. An audit field for CreatedBy is an obvious example but there are other fields that fall into this category too. These fields may not be database generated. &lt;/p&gt;&#xA;&lt;p&gt;The way to configure that would be in the entity mapping to add &amp;quot;.Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore)&amp;quot; on the field. There are two field examples below with that configuration. &lt;/p&gt;&#xA;&lt;p&gt;I&#x27;m looking for a recommendation on how to emit that code. I&#x27;m assuming I will need to use a custom template and I&#x27;m doing this for the fields with standard names such as the ones like CreatedBy and Ulid in the example. For non-standard fields, what would the best way to flag those fields for the template? Add an attribute like [WriteOnce]?&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&quot;cs&quot;&gt;protected virtual void MapMyEntity(EntityTypeBuilder&amp;lt;MyEntity&amp;gt; config)&#xA;{&#xA;    config.ToTable(&amp;quot;MyEntity&amp;quot;, &amp;quot;dbo&amp;quot;);&#xA;    config.HasKey(t =&amp;gt; t.Id);&#xA;    config.Property(t =&amp;gt; t.Id).HasColumnName(&amp;quot;MyEntityId&amp;quot;).ValueGeneratedOnAdd();&#xA;    config.Property(t =&amp;gt; t.SomeValue).HasMaxLength(200).IsRequired();&#xA;    config.Property(t =&amp;gt; t.Ulid).HasMaxLength(26).IsRequired().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);&#xA;    config.Property(t =&amp;gt; t.CreatedDateOffset).ValueGeneratedOnAdd();&#xA;    config.Property(t =&amp;gt; t.CreatedBy).HasMaxLength(100).IsRequired().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;</description>
					<author>jovball</author>
					<link>https://llblgen.com/tinyforum/Thread/29075#154603</link>
					<pubdate>Tue, 17 Feb 2026 21:38:54 GMT</pubdate>
					<category>Write once fields with EF Core</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29075#154603</guid>
				</item>
				<item>
					<title>Disable taskGroupPreset or taskPreset by Otis</title>
					<description>&lt;blockquote&gt;&lt;p class=&quot;quote-nickname&quot;&gt;jovball wrote:&lt;/p&gt;&#xA;&lt;p&gt;Ignore my last question about performRule. The documentation is here: https://www.llblgen.com/Documentation/5.12/SDK/tasksxmlformat.htm&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Thanks. The performRule xml in the docs was indeed wrong, should be isEnabled, it&#x27;s fixed now. The editor has rudimentary intellisense indeed, on xml and also for C# (e.g. in the search editor). &lt;/p&gt;&#xA;</description>
					<author>Otis</author>
					<link>https://llblgen.com/tinyforum/Thread/29054#154494</link>
					<pubdate>Tue, 25 Nov 2025 09:25:10 GMT</pubdate>
					<category>Disable taskGroupPreset or taskPreset</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29054#154494</guid>
				</item>
				<item>
					<title>Disable taskGroupPreset or taskPreset by jovball</title>
					<description>&lt;p&gt;Ignore my last question about performRule. The documentation is here: https://www.llblgen.com/Documentation/5.12/SDK/tasksxmlformat.htm&lt;/p&gt;&#xA;</description>
					<author>jovball</author>
					<link>https://llblgen.com/tinyforum/Thread/29054#154493</link>
					<pubdate>Mon, 24 Nov 2025 19:26:22 GMT</pubdate>
					<category>Disable taskGroupPreset or taskPreset</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29054#154493</guid>
				</item>
				<item>
					<title>Disable taskGroupPreset or taskPreset by jovball</title>
					<description>&lt;p&gt;I meant to include this in my original post.&lt;/p&gt;&#xA;&lt;p&gt;https://www.llblgen.com/Documentation/5.12/SDK/tasksandpresets.htm&lt;/p&gt;&#xA;&lt;p&gt;TIL: That Edit as XML has Intellisense. I&#x27;ve always thought of it as just a Notepad type editor. &lt;/p&gt;&#xA;&lt;p&gt;One more question while I&#x27;m here. Some of the existing taskPresets have a performRule element but I don&#x27;t see any documentation on it. What does that do?&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;performRule isEnabled=&amp;quot;false&amp;quot; settingName=&amp;quot;&amp;quot; operator=&amp;quot;0&amp;quot; operand=&amp;quot;&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;</description>
					<author>jovball</author>
					<link>https://llblgen.com/tinyforum/Thread/29054#154492</link>
					<pubdate>Mon, 24 Nov 2025 13:36:54 GMT</pubdate>
					<category>Disable taskGroupPreset or taskPreset</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29054#154492</guid>
				</item>
				<item>
					<title>Disable taskGroupPreset or taskPreset by Otis</title>
					<description>&lt;p&gt;The syntax is &lt;code&gt;isEnabled=&amp;quot;false&amp;quot;&lt;/code&gt;, not &lt;code&gt;enabled=&amp;quot;false&amp;quot;&lt;/code&gt;. If you use the preset editor -&amp;gt; Edit as Xml, you get intellisense which will tell you this. Also, e.g. the preset SD.Presets.Adapter.General.preset has 2 disabled tasks at the bottom. I tried it out and disabling a task in the preset using isEnabled=&amp;quot;false&amp;quot; worked fine. &lt;/p&gt;&#xA;&lt;p&gt;So I think the docs are wrong here, so which document mentions this wrongly so we can correct it?&lt;/p&gt;&#xA;</description>
					<author>Otis</author>
					<link>https://llblgen.com/tinyforum/Thread/29054#154491</link>
					<pubdate>Mon, 24 Nov 2025 07:58:32 GMT</pubdate>
					<category>Disable taskGroupPreset or taskPreset</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/29054#154491</guid>
				</item>
		</channel>
	</rss>
