Skip to Main Content
Programming WCF Services
book

Programming WCF Services

by Juval Lowy
February 2007
Intermediate to advanced content levelIntermediate to advanced
634 pages
16h 1m
English
O'Reilly Media, Inc.
Content preview from Programming WCF Services

Data Contracts

  1. Use the DataMemberAttribute on properties or read-only public members only.

  2. Avoid explicit XML serialization on your own types.

  3. When using the Order property, assign the same value to all members coming from the same level in the class hierarchy.

  4. Support IExtensibleDataObject on your data contracts.

  5. Avoid setting IgnoreExtensionDataObject on the ServiceBehavior and CallbackBehavior attributes to true. Keep the default of false.

  6. Do not mark delegates and events as data members.

  7. Do not pass .NET-specific types, such as Type, as operation parameters.

  8. Do not accept or return ADO.NET DataSet and DataTable (or their type-safe subclasses) from operations. Return a natural representation such as an array.

  9. Suppress the generation of a generic type parameter hash code and provide a legible type name instead.

  10. Avoid the /ct switch of SvcUtil or any other way of sharing an assembly type across the service boundary.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming WCF Services, 3rd Edition

Programming WCF Services, 3rd Edition

Juval Lowy
Mastering ASP.NET Web API

Mastering ASP.NET Web API

Mithun Pattankar, Malendra Hurbuns

Publisher Resources

ISBN: 0596526997Supplemental ContentErrata Page