0 Replies - 8233 Views - Last Post: 22 November 2011 - 01:28 PM

#1 m1dnigh7  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 21-February 11

Silverlight WCF Web Service Completed method

Posted 22 November 2011 - 01:28 PM

Hello guys,

I'm here again. I'm working on a 100% silverlight website named SOA. It's fully functional, and now I'm in the process of hooking it up with my Entity Model through webservices.

So what do I have in my solution?
- SOA (which is the fully silverlight based website)
contains a service reference named RecipientServiceRef.

- SOA_Web: the website in which the silverlight will be hosted, as I also have to create some sort of CMS which I will add in an other project.


So this is the code I run at my silverlight project. It will instantiate the RecipientServiceClient and call it's methods.

Thisis the Service class.

And finally thisis the Domain Service class which will actually edit entities from my EF.


Now what is my problem?

On my website in silverlight the user has the option of registering for a newsletter (email). They do this by filling in the textboxes they see. (Name and Email). I already have an expression to validate the email, but not one to see if it already exists in the DB.

So what was I planning?

I was going to edit the OnTextChanged method of my email textbox, and everytime a user changes the text it would query the input to the database, and could return fale or true if it exists.

If I try to do this with the currect solution i have, I would call "public bool DoesExist(Recipient input) (or use only mail as argument) on my DomeinServiceClass. But then when I call the apropriate method in my Service, I would have to catch the completed event. Which would have to edit a bool attribute of my mainpage.xaml or something. This is doable, but I doubt wether it's proper way of coding.

Grtz,

Is This A Good Question/Topic? 0
  • +

Page 1 of 1