Strongly Type Entity Identifiers
<p>When working with service oriented applications we often use system types to identify / query our business entities.</p>

<pre><code>IList&lt;Product&gt; GetProductsByUserAndCategoryId(int userId, int categoryId);
</code></pre>

<p>However we can't prevent developpers to pass another identifier which is not a "User Identifier" and not a "Category Identifier", or maybe inverse the ids on method call.</p>

<p>So a solution is to use Strongly Type Identifiers, like this :</p>

<pre><code>IList&lt;Product&gt; GetProductsByUserAndCategoryId(UserId userId, CategoryId categoryId);

GetProductsByUserAndCategoryId(new UserId(123), new CategoryId(456));
</code></pre>

<p>What do you think about this ? Pros and cons ?</p>
