I have a problem with serializing the list of objects to message for MSMQ. The thing what I am trying to do is:
We have a Booking object, and two integers that we want to send through the message.
List<object> parameters = new List<object>();
parameters.Add(booking);
parameters.Add(int1);
parameters.Add(int2);
...
message.Body = parameters;
mq.Send(message);
When I am trying to send a message, I am getting the exception:
The type MasterModel.Model.Booking.Booking was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
I have no Base class for Booking class. I am kind of stuck at this point, I have read a big part of solutions, but never found a proper one for my case.
Can somebody help me out?