DataObject on client. RRS feed

  • Question

  • Hi, I was wondering is it possible to have a base class for all entity classes on client side? Right now it is Entity class, yet one could imagine a scenario where you might want to add more functionality on client. I figured out 2 solutions:
    1) Add a "dummy" class on server as a base for all other entity classes. The problem here would be KnownTypeAttribute, as the dummy class would be defined in one assembly and reuse in rest. This causes injecting this information somehow on client and server.
    2) Manually regenerate client code - Injecting your own class in the middle: DbEntity : MyCommonBaseClass : Entity
    Friday, April 16, 2010 6:39 AM


  • If you look way back in the archives of this forum, you will find people doing that using codedom to hook into the code generation and add their own base classes. I belive they supplied sample code if you can find the posts.

    Friday, April 16, 2010 8:10 AM