I hate repying like this. I wish I knew a more specific answer. I will be doing the same thing as you and this is how I am doing it:
1. Create a WCF service that runs on the same data server or in another web server which has tcpip access to it. The WCF service will serve your data.
2. Consume (create an instance) of the WCF in your Silverlight application.
3. Call the method in the WCF service that exposes (retrieves) the data you need.
Upon creating the WCF, create it an independent library (standard dll), separated from Silverlight.
Do not return primitive data types in your WCF service, but rather complex data types that apply to your business domain; that is, if you are returning permits, create a custom business object (cbo) that exposes a permit. For example, I retrieve water meters info, so I have a Meter cbo returned:
/* request */
public class Meter
{
public long DcomId { get; set; }
public long DeviceId { get; set; }
public short DeviceType { get; set; }
...
}
The WCF fills this object and this is the one returned to you in the Silverlight application.
Also, when you request, do not use primitive values either; use a request class:
/* Result */
public class PermitRequest
{
public string Name { get; set; }
public int ID { get; set; }
public DateTime { get; set; }
}
Now, your class that exposes the service in the WCF service has a method like this:
public PermitResult GetPermit(PermitRequest request)
{
}
From your Silverlight application:
Meter myMeter = (Meter)objWCF.GetPermit(objPermitRequest);
Sorry about this....
As I said, I wish I knew a shorter option.
Hugo.