	<rss version="2.0">
		<channel>
			<title>LLBLGen Pro Support System Generated code FAQ feed</title>
			<link>https://llblgen.com/tinyforum//Forum/39</link>
			<description>This is the RSS feed for the forum Generated code FAQ on the LLBLGen Pro Support System forum system.</description>
			<ttl>30</ttl>
			<language>en-us</language>
				<item>
					<title>Can I use the generated code in a Medium Trust environment? by Otis</title>
					<description>&lt;p&gt;Starting with the LLBLGen Pro runtime framework build of April 4th, 2011, the generated code of v3.0 and v3.1 can be used in a Medium Trust environment. Medium Trust is sometimes required on shared hosting platforms and cloud service providers like GoDaddy or Rackspace. &lt;/p&gt;&#xA;&lt;p&gt;.NET 4&#xD;&#xA;For using the generated code in a Medium Trust environment with .NET 4, the following additional action has to be taken to avoid a security exception related to inheritance:&lt;/p&gt;&#xA;&lt;p&gt;Adapter&#xD;&#xA;Add the following line to the AssemblyInfo.cs/vb class in the generated &lt;strong&gt;DbGeneric&lt;/strong&gt; VS.NET project:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&quot;cs&quot;&gt;&#xA;// C#:&#xA;[assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)]&#xA;&#xA;&#x27; VB.NET:&#xA;&amp;lt;Assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)&amp;gt;&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;SelfServicing&#xD;&#xA;Add the following line to the AssemblyInfo.cs/vb class in the generated VS.NET project:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&quot;cs&quot;&gt;&#xA;// C#:&#xA;[assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)]&#xA;&#xA;&#x27; VB.NET:&#xA;&amp;lt;Assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)&amp;gt;&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Linq&#xD;&#xA;To use Linq, the service provider has to have enabled ReflectionPermission to be unrestricted. This is in general the case, as Entity Framework and Linq to Sql require this setting to be unrestricted. It&#x27;s a change in the Medium Trust level, so it&#x27;s not enabled by default when the default Medium Trust is selected. If your service provider doesn&#x27;t want to enable ReflectionPermission to be unrestricted, you have to use our native query API instead of Linq. Linq uses compiled lambda&#x27;s and this .NET 3.5 feature requires ReflectionPermission to be unrestricted.&lt;/p&gt;&#xA;</description>
					<author>Otis</author>
					<link>https://llblgen.com/tinyforum/Thread/19640#110757</link>
					<pubdate>Tue, 05 Apr 2011 09:28:45 GMT</pubdate>
					<category>Can I use the generated code in a Medium Trust environment?</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/19640#110757</guid>
				</item>
				<item>
					<title>My entity classes don&#x27;t have a Save() method by MTrinder</title>
					<description>&lt;p&gt;&lt;strong&gt;Alternate Solution&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;You are using the SelfServicing templates but the project you are calling the generated code from does not have a reference to the ORMSupportClasses DLL and has not yet been built.  &#xD;&lt;/p&gt;&#xA;&lt;p&gt;The .Save methods are inherited from base classes in the support dll, and so this needs to be referenced, and the project built, for these to be visible.&lt;/p&gt;&#xA;</description>
					<author>MTrinder</author>
					<link>https://llblgen.com/tinyforum/Thread/10945#80774</link>
					<pubdate>Tue, 14 Oct 2008 19:52:50 GMT</pubdate>
					<category>My entity classes don&#x27;t have a Save() method</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/10945#80774</guid>
				</item>
				<item>
					<title>How to generate DTOs with LLBLGen Pro? by Otis</title>
					<description>&lt;p&gt;For C#, start here:&#xD;&#xA;&lt;a href=&quot;http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=41429&amp;amp;ThreadID=6261&quot; rel=&quot;nofollow&quot;&gt;http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=41429&amp;amp;ThreadID=6261&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;the same template ported to VB.NET: &#xD;&#xA;&lt;a href=&quot;http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=65950&amp;amp;ThreadID=11870&quot; rel=&quot;nofollow&quot;&gt;http://www.llblgen.com/tinyforum/GotoMessage.aspx?MessageID=65950&amp;amp;ThreadID=11870&lt;/a&gt;&lt;/p&gt;&#xA;</description>
					<author>Otis</author>
					<link>https://llblgen.com/tinyforum/Thread/11906#66169</link>
					<pubdate>Mon, 19 Nov 2007 09:59:55 GMT</pubdate>
					<category>How to generate DTOs with LLBLGen Pro?</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/11906#66169</guid>
				</item>
				<item>
					<title>Is there a Find method in the Entity collections? by Aglaia</title>
					<description>&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt;&#xD;&#xA;I want to look up an entity in a collection with read entities. Is there a Find method in the Entity collections? &lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&#xD;&#xA;You can find entities easily with in-memory filtering on an entitycollection. Take for example the following code, which finds the CustomerEntity with the PK &amp;quot;CHOPS&amp;quot; in the customer collection. This works for both Adapter and SelfServicing. It will use the DefaultView object for this.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&quot;cs&quot;&gt;&#xA;// C#&#xA;CustomerCollection customers = new CustomerCollection();&#xA;// get all customers&#xA;customers.GetMulti(null);&#xA;IEntityView view = customers.DefaultView;&#xA;// filter view&#xA;view.Filter = (CustomerFields.CustomerId == &amp;quot;CHOPS&amp;quot;);&#xA;// get a reference to the entity to find:&#xA;CustomerEntity toFind = view[0];&#xA;&#xA; VB.NET&#xA;Dim customers As New CustomerCollection()&#xA;&#x27; get all customers&#xA;customers.GetMulti(Nothing)&#xA;Dim view As IEntityView = customers.DefaultView&#xA;&#x27; filter view&#xA;view.Filter = New FieldCompareValuePredicate(CustomerFields.CustomerId, _&#xA;ComparisonOperator.Equals, &amp;quot;CHOPS&amp;quot;)&#xA;&#x27; get a reference to the entity to find:&#xA;CustomerEntity toFind = view(0)&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;</description>
					<author>Aglaia</author>
					<link>https://llblgen.com/tinyforum/Thread/10949#61004</link>
					<pubdate>Tue, 21 Aug 2007 11:20:58 GMT</pubdate>
					<category>Is there a Find method in the Entity collections?</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/10949#61004</guid>
				</item>
				<item>
					<title>Added entity in visual studio.net project isn&#x27;t there by Aglaia</title>
					<description>&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt;&#xD;&#xA;I&#x27;ve added a new table (also applies to renaming a table and re-adding the entity) and have added the entity to my project after the project refresh. When I generate the code in the directory where my generated code was located and I open the visual studio.net project, the entity is not there! How to solve this?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&#xD;&#xA;Generating code will also create a visual studio.net project file. Since a user can have added own classes to this project file, it will not be overwritten, but updated, if the file is writable. If your visual studio.net project file isn&#x27;t updated, it&#x27;s probably read-only, perhaps due to the usage of Visual Sourcesafe. You can check the result of every generation task in the application output window in LLBLGen Pro.&lt;/p&gt;&#xA;</description>
					<author>Aglaia</author>
					<link>https://llblgen.com/tinyforum/Thread/10948#61003</link>
					<pubdate>Tue, 21 Aug 2007 11:20:05 GMT</pubdate>
					<category>Added entity in visual studio.net project isn&#x27;t there</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/10948#61003</guid>
				</item>
				<item>
					<title>Using NUnit for testing purposes by Aglaia</title>
					<description>&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt;&#xD;&#xA;I want to unit test the generated code together with my code using NUnit. However it doesn&#x27;t work, NUnit can&#x27;t connect to the database, how come?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&#xD;&#xA;If you want to use NUnit for testing purposes, you have to create an app.dll.config file (where app is the name of the project created for NUnit testing) and place it in the bin\debug directory for the NUnit project. For example if you create a new project called &amp;quot;UnitTest&amp;quot; for NUnit testing, and after adding the appropriate references (see LLBLGen Pro and NUnit documentation) you must copy the App.config file that LLBLGen Pro creates to the directory where the NUnit test dll resides (bin\debug) and rename it to &amp;quot;UnitTest.dll.config&amp;quot;.&lt;/p&gt;&#xA;</description>
					<author>Aglaia</author>
					<link>https://llblgen.com/tinyforum/Thread/10947#61002</link>
					<pubdate>Tue, 21 Aug 2007 11:19:34 GMT</pubdate>
					<category>Using NUnit for testing purposes</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/10947#61002</guid>
				</item>
				<item>
					<title>Is the generated code vulnerable to SQL injection attacks? by Aglaia</title>
					<description>&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt;&#xD;&#xA;LLBLGen Pro generates SQL on the fly and doesn&#x27;t use stored procedures to do its database operations. Aren&#x27;t these queries vulnerable for SQL injection attacks?&#xD;&#xA;**&#xD;&#xA;Solution:**&#xD;&#xA;All SQL generated by LLBLGen Pro is parameterized. This means that no values are embedded into the SQL query being generated. Due to the parameters, a value can never influence the query being executed, as the value will never be part of the query itself, but just a value of a parameter. The generated code is therefore not vulnerable for SQL injection attacks.&lt;/p&gt;&#xA;</description>
					<author>Aglaia</author>
					<link>https://llblgen.com/tinyforum/Thread/10946#61000</link>
					<pubdate>Tue, 21 Aug 2007 11:18:56 GMT</pubdate>
					<category>Is the generated code vulnerable to SQL injection attacks?</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/10946#61000</guid>
				</item>
				<item>
					<title>My entity classes don&#x27;t have a Save() method by Aglaia</title>
					<description>&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt;&#xD;&#xA;When I generate code, I noticed that my entity classes don&#x27;t have a Save() method and my typed list classes don&#x27;t have a Fill() method. What&#x27;s wrong?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&#xD;&#xA;You&#x27;ve chosen one of the Adapter generator configurations in the generator configuration screen but you expected SelfServicing code. To get SelfServicing code, select SelfServicing from the Template Group drop-down-list in the General Settings tab of the code generation window.&lt;/p&gt;&#xA;</description>
					<author>Aglaia</author>
					<link>https://llblgen.com/tinyforum/Thread/10945#60999</link>
					<pubdate>Tue, 21 Aug 2007 11:18:24 GMT</pubdate>
					<category>My entity classes don&#x27;t have a Save() method</category>
					<guid ispermalink="true">https://llblgen.com/tinyforum/Thread/10945#60999</guid>
				</item>
		</channel>
	</rss>
