Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1092623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:42:41+00:00 2026-05-16T23:42:41+00:00

i wish to create a repository pattern but with a WCF Rest Service which

  • 0

i wish to create a repository pattern but with a WCF Rest Service which controls the data access. Can anyone confirm or help with my thinking / config.

  1. ASP.NET Controllers >> call to service (not rest service but service of a repository pattern)
  2. Repository Pattern Service >> calls to repository
  3. Repository >> calls to WCF Rest Service to receive data.

Is this setup good, or should i remove the Repository layer and have the Repository service call directly to the REST Service?

Does anyone do a similar setup?

I would love to hear comments?

Basically my Rest Service (WCF) would return XHTML…

So in my repository layer how would i convert whats returned from my Rest Service into IQUERYABLE? I presume i would need to do ReadAsDataContract into a class (data contract) and then use LINQ to OBJECTS?? This is a causing me a bit of confusing

Becuase of course the normal is to return IQUERYABLE form the repository layer to the service layer

Then the service layer returns to the calling client normal as TOLIST or similar.

Really appreciated any input anyone has.

Thanks

EDIT

Ermm after rethining this, i think i am doing it wrong… i should basically just covert the Service layer of the repository into a WCF REST Service… this way my other clients can call my rest service??

I suppose i keep the Repository layer there but i could get this to call a Data Services layers (technically another rest service) for my data acces..

Does this make better sense?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:42:41+00:00Added an answer on May 16, 2026 at 11:42 pm

    By trying to hide the REST layer behind a repository you are attempting to implement distributed objects. REST was never intended as an approach to implement this type of architecture.

    If you really want to do REST, you are going about it the wrong way. However, you are far from alone in this pursuit.


    Update:

    The only place I see a repository for domain objects is on the server, behind the REST interface. All you have on the client is media type handlers and user agent scripts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish to create a Telerik grid which can be grouped by different fields
I wish to know is there any way that I can create the threads
I wish to create event which will react on change of int/ eventually Integer
i wish to create a reusable ASP.NET MVC ViewUserControl which is strongly typed to
I wish to create a view like <%@ Control Language=C# Inherits=System.Web.Mvc.ViewUserControl<System.DateTime?> %> but I
I wish to create a call object from a string. alist() , which does
I wish to create a class in Python that I can add and remove
I wish to create a window with a title bar and button bar but
I wish to create a multi method which I call like this: (defmethod some-method
I wish to create a login screen which only shows in the app once

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.