Reputation: 1081
I have a website which has a WCF service and a silverlight control. An external application adds a "batch" of data to a database by calling a method in the WCF service. The user then goes to website and validates the batch against a set of pre-determined business rules using the silverlight control. Once the batch is validated it is automatically exported to another application and removed from the database.
What I would like to be able to do is, when the batch is added to the database using the WCF service, check it against the rules automatically and, if it is valid, export it straight away without any user intervention. So when the user goes to the website they will only be presented with batches whose data is invalid and needs modifying.
So basically, what I want to be able to do it call a method that is contained in my silverlight control from the WCF service. Is this possible? Every search I've done for "call silverlight from WCF" has only returned results for "call WCF from silverlight". Any help would be greatly appreciated
Upvotes: 1
Views: 78
Reputation: 93551
You cannot combine full .Net assemblies with Silverlight assemblies as Silverlight uses a subset of the .Net framework (i.e. a completely different set of .Net assemblies).
You will need to include the relevant code (add the file as a link is one option) so that the specific source code is compiled in both the Silverlight project (using Silverlight version of .Net) and the WCF web service (using full version of .Net).
Upvotes: 1