Architect 2 : Calling WCF Services in Your Data Access Layer

After you have completed an N-tier Silverlight application (check my blog: http://weblogs.asp.net/stanleygu/archive/2009/12/20/building-n-tier-silverlight-application.aspx ), your company decides to outsource sql server database development and management to a third party vendor. In your data access layer, instead of calling the sql server database directly, you will need to call the WCF services provided by the vendor.

1.       At your data access layer, add Service Reference using the vendor’s WCF Service URL and name it CustomerServiceReference.

2.       The Visual Studio 2008 IDE adds an app.config for you automatically.

3.       Copy the content of the app.config to your Web.config and do modification if necessarily.

4.       Remove the app.config file.

5.       Locate the method of GetCustomers and remove its old code.

6.       Add new code calling the WCF service to the GetCustomers method.

 

12 Comments

  • That the the next time I just read a weblog, I
    really hope that this doesnt disappoint me about brussels.
    Discover real, Yes, it was my replacement for read, but When i thought youd have
    something intriguing to talk about. All I hear can be a number of whining about something you could fix if
    you ever werent too busy seeking for attention.

  • Undeniably believe that which you said. Your favorite reason appeared
    to be on-line that the simplest thing to be aware of. I say to you, I definitely find out annoyed while
    people think about worries that they just don’t identify about.
    You managed to hit that the nail upon that the top and also defined
    out the whole thing without having side-effects , people
    can take a signal. Will likely be back to obtain more.
    Thanks

  • My spouse and I absolutely love your blog and find the majority of your
    post's to be just what I'm looking for. can you offer guest writers to write content for you personally?
    I wouldn't mind composing a post or elaborating on a few of the subjects you write regarding here. Again, awesome web site!

  • Hi there friends, good post and fastidious arguments
    commented here, I am truly enjoying by these.

  • It's awesome designed for me to have a web site, which is useful for my know-how. thanks admin

  • Hi Dear, are you genuinely visiting this website daily, if so
    afterward you will without doubt get fastidious knowledge.

  • This is the perfect blog for anybody who wants to find out about this topic.
    You understand so much its almost tough to argue with you (not
    that I really would want to…HaHa). You definitely put a new spin on a topic that's been discussed for many years. Great stuff, just wonderful!

  • Woah! I'm really loving the template/theme of this site. It's simple, yet effective.
    A lot of times it's difficult to get that "perfect balance" between superb usability and appearance. I must say that you've done a
    great job with this. Also, the blog loads very quick for me on Internet explorer.

    Exceptional Blog!

  • Having read this I thought it was really informative. I appreciate you taking the time and
    effort to put this short article together.
    I once again find myself spending a significant amount of time both reading and leaving comments.

    But so what, it was still worth it!

  • I like reading through an article that will
    make men and women think. Also, many thanks for
    allowing me to comment!

  • Hello, I check your blog daily. Your story-telling style is witty,
    keep doing what you're doing!

  • Having read this I believed it was very enlightening. I appreciate
    you finding the time and effort to put this information
    together. I once again find myself personally spending a significant amount of time both reading and leaving comments.
    But so what, it was still worth it!

Comments have been disabled for this content.