WCF and Namespaces

Last post 11-12-2008 9:34 AM by noox. 0 replies.

Sort Posts:

  • WCF and Namespaces

    11-12-2008, 9:34 AM
    • Member
      2 point Member
    • noox
    • Member since 12-08-2002, 7:57 AM
    • Salzburg, Austria
    • Posts 2

    I've a service with a lot of classes in various class hierarchies. Some of the classes are part of the data contract of the WCF service interface. As there are many classes I will introduce a namespace/directory structure to group the classes (and "hide" unimportant base classes). But some of the classes logically belonging to different namespaces should be part of the data contract of the service.

     I'm new to WCF but I assume I  have two possibilities:

    1. Move the classes used in the data contract into the service namespace. What I found out is that when a class is in the service interface it's base classes have to be in the service interface too.
    2. Use special service classes. The objects are copied from the internal objects. As I only need a small subset of the properties of the classes in the service anyway this would be an option. But I need to create new objects and copy the data.

    Which solution would you prefer? Or is there another one?

    Thanks

    Filed under: ,
Page 1 of 1 (1 items)