<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Moses Yap Tech Blog</title>
	<atom:link href="http://www.mosesyap.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.mosesyap.com/blog</link>
	<description>Miscellaneous tech notes</description>
	<lastBuildDate>Thu, 04 Mar 2010 05:53:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Subsonic 3.0: Specifying only included tables</title>
		<link>http://www.mosesyap.com/blog/?p=11</link>
		<comments>http://www.mosesyap.com/blog/?p=11#comments</comments>
		<pubDate>Mon, 01 Mar 2010 01:23:40 +0000</pubDate>
		<dc:creator>mosesyap</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Subsonic]]></category>

		<guid isPermaLink="false">http://www.mosesyap.com/blog/?p=11</guid>
		<description><![CDATA[Subsonic 3.0 uses T4 templates, which makes is very easy to extend.  One thing that is missing out of the box though, is the ability to specify only tables to be included.  The current download (version 3.0.0.3) has an array (ExcludeTables) for specifying table names that we don’t want to generate a DAL for, but [...]]]></description>
			<content:encoded><![CDATA[<p>Subsonic 3.0 uses T4 templates, which makes is very easy to extend.  One thing that is missing out of the box though, is the ability to specify only tables to be included.  The current download (version 3.0.0.3) has an array (ExcludeTables) for specifying table names that we don’t want to generate a DAL for, but if we want to generate only a few tables on a database that has 10s or even hundreds of tables, this is not very efficient.  It’s great that the T4 templates are very easy to extend.<span id="more-11"></span></p>
<p>Steps:</p>
<p>1. Create a new array to hold table names to be included.  Put this in Settings.ttinclude.</p>
<p>//this is a list of tables we explicitly want to include, if no records or null, then it is not used<br />
//string[] IncludeTables = null;<br />
string[] IncludeTables = new string []<br />
{<br />
    &#8220;Customers&#8221;<br />
};</p>
<p>2. Look for any occurrence of ExcludeTables on the rest of the T4 files because we pretty much know the if statements dealing with this filters the list of tables to generate a DAL for.</p>
<p>Example<br />
Change:<br />
if(!ExcludeTables.Contains(tbl.Name))</p>
<p>to:</p>
<p>if(!ExcludeTables.Contains(tbl.Name) &amp;&amp; ((IncludeTables == null || IncludeTables.Count() == 0) || IncludeTables.Contains(tbl.Name)))</p>
<p>That’s pretty much it.</p>
<p>Here is a zip file containing a working version.</p>
<p><a href="http://www.mosesyap.com/blog/wp-content/uploads/2010/03/SubSonic_3_0_0_3_MTY.zip">SubSonic_3_0_0_3_MTY</a> (zip file)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mosesyap.com/blog/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ASP.NET: Changing assembly binding</title>
		<link>http://www.mosesyap.com/blog/?p=1</link>
		<comments>http://www.mosesyap.com/blog/?p=1#comments</comments>
		<pubDate>Sat, 27 Feb 2010 00:12:17 +0000</pubDate>
		<dc:creator>Moses Yap</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mosesyap.com/blog/?p=1</guid>
		<description><![CDATA[Recently, I had a problem where I was using a different version of an assembly for my custom app, but it had a dependency on a dll that is referring to another version of that assembly.
To be more particular, I am using Subsonic version 2.2 (http://www.subsonicproject.com/) which is an excellent DAL framework but a pre-built [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I had a problem where I was using a different version of an assembly for my custom app, but it had a dependency on a dll that is referring to another version of that assembly.</p>
<p>To be more particular, I am using Subsonic version 2.2 (<a href="http://www.subsonicproject.com/">http://www.subsonicproject.com/</a>) which is an excellent DAL framework but a pre-built library I am using has a dependency on Subsonic version 2.0.3.</p>
<p>To force a particular version of the assembly, we can use the assembly binding.</p>
<p>Here is a sample:</p>
<div id="_mcePaste">&lt;runtime&gt;</div>
<div id="_mcePaste">&lt;assemblyBinding xmlns=&#8221;urn:schemas-microsoft-com:asm.v1&#8243;&gt;</div>
<div id="_mcePaste">&lt;dependentAssembly&gt;</div>
<div id="_mcePaste">&lt;assemblyIdentity name=&#8221;SubSonic&#8221; publicKeyToken=&#8221;eadb47849839a332&#8243; /&gt;</div>
<div id="_mcePaste">&lt;bindingRedirect oldVersion=&#8221;2.0.0.0-2.0.4.0&#8243; newVersion=&#8221;2.2.0.0&#8243; /&gt;</div>
<div id="_mcePaste">&lt;/dependentAssembly&gt;</div>
<div id="_mcePaste">&lt;/assemblyBinding&gt;</div>
<div id="_mcePaste">&lt;/runtime&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.mosesyap.com/blog/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SAP B1: Getting information on the Database Schema</title>
		<link>http://www.mosesyap.com/blog/?p=5</link>
		<comments>http://www.mosesyap.com/blog/?p=5#comments</comments>
		<pubDate>Thu, 12 Jun 2008 00:58:55 +0000</pubDate>
		<dc:creator>Moses Yap</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mosesyap.com/blog/?p=5</guid>
		<description><![CDATA[For SAP B1 developers, its sometimes difficult to determine which table to select from, specially with so many tables and columns on the DB. It does not help much that the table names can be pretty cryptic as well.
Here are some places to get information:
1. SAP SDK documentation
This is probably the most straightforward. When we [...]]]></description>
			<content:encoded><![CDATA[<p>For SAP B1 developers, its sometimes difficult to determine which table to select from, specially with so many tables and columns on the DB. It does not help much that the table names can be pretty cryptic as well.</p>
<p>Here are some places to get information:<span id="more-5"></span></p>
<p><strong>1. SAP SDK documentation</strong></p>
<p>This is probably the most straightforward. When we install the SAP B1 SDK, it comes with a CHM file the the database documentation. Finding what you want can be difficult, but the easiest way is to use the Search and use keywords.</p>
<p><strong>2. From SAP B1 Client</strong></p>
<p>There SAP B1 Client can give a lot of information. Here are 2 ways that comes into mind right away:</p>
<blockquote><p>1. Using the System Information (View -&gt; System Information or Ctrl+Shift+I). When this is selected, you can see the table and column used when you mouse over a field in any of the forms in SAP B1 if that particular field is bound to the table.</p></blockquote>
<blockquote><p>2. Using the Query Generator function in SAP B1 (Tools -&gt; Queries -&gt; Query Generator).</p></blockquote>
<p><strong>3. Using the SQL Profiler</strong></p>
<p>Sometimes, its just so damn hard to get what tables are affected by an operation. In this case, just turn on the SQL Profiler, do the operation you need done on the SAP B1 Client and look at the sql commands on the SQL Profiler output.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mosesyap.com/blog/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
