A D

A D

  • NA
  • 12
  • 0

Add method on Opertaion Contract

Jan 14 2010 11:18 AM

Hello,
I have created a windows service and I am having an issue calling a method to an external class. Here is my setup
[ServiceContract] 
[
ServiceKnownType(typeof(Customer))]
public interface ICustomerService 
{ 
 
     
[OperationContract] 
     
void PersistCustomer(Customer customer); 
} 

The Customer has get and set properties which have no difficulty setting, but the there is an Add method on customer that throws an NotSupportedException; "Collection was of fixed size",  each time I try to use it. The collection of "customers" is setup as an IList and excepts types ICustomer as I have defined. When I try using the Add method outside of my service I have no issues at all, which leads me to think I do not have something setup right on my ICustomerService. Can anyone help me with this issue please?
 

Answers (1)