Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>We use <code>partial</code> implementations frequently but I don't find it to be code smell. In fact, I think it is a lot better than wrapping them with more code. At that point, you might as well skip RIA and write your own WCF change tracker... but I digress.</p> <p>If you want a rich domain model, then <code>partial</code> implementations are one great way to accomplish that. The default code generator creates partial methods for the most meaningful points in a WCF RIA entity's life cycle. By implementing these partials, you move away from the <a href="http://martinfowler.com/bliki/tags/domain%20driven%20design.html" rel="nofollow">Anemic Domain Model</a>.</p> <p>As you stated above, you can implement an interface and create your own methods and properties. IOW you are not limited to implementing the <code>partial</code> stubs. If all else fails, <a href="http://jeffhandley.com/archive/2010/10/28/RiaServicesT4WalkUp.aspx" rel="nofollow">modify the default code generator</a> to your liking. I did to remove <code>sealed</code> from every entity to make testing easier. </p> <p><strong>UPDATE:</strong> Here is my code to remove <code>sealed</code></p> <pre><code>[DomainServiceClientCodeGenerator(typeof (CustomClientCodeGenerator), "C#")] public class CustomClientCodeGenerator : CSharpClientCodeGenerator { private EntityGenerator _entityGenerator; protected override EntityGenerator EntityGenerator { get { return _entityGenerator ?? (_entityGenerator = new CustomEntityGenerator()); } } private class CustomEntityGenerator : CSharpEntityGenerator { public override string TransformText() { return base.TransformText().Replace("sealed ", string.Empty); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload