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 8279153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:14:21+00:00 2026-06-08T09:14:21+00:00

I have a C# solution with this structure: Project 1: Contains a Dao (can

  • 0

I have a C# solution with this structure:

  • Project 1: Contains a Dao (can contain more than one)
  • Project 2: Contains an interface (only one)
  • Project 3: A wcf service with its own interface

  • The dao in project 1 implements the interface in project 2.

  • The wcf service interface in project 3 implements/inherits/entends the interface in project 2.

The problem I have is that the interface in project 2 is needed to describe my dao class(s). The wcf interface is needed to describe what functions are available in my wcf service in project 3. The two interfaces are exactly the same, apart from the wcf attributes being on the wcf interface, because all the functions in the dao need to be exposed by the wcf service file too. The implementation or rather the dao class can be changed/swapped out but must always follow the same structure hence the need for an interface. Now with these two interfaces being identical when I try to implement it in my wcf interface I am told I must effectively override all of the methods in the interface I am deriving from. Is this the correct thing to do? The wcf interface needs to implement the interface from project 2 so that it provides all the functions we need from the dao (which is all of them).

Previously I had the project set up as follows:

  • Project 1: Contains the dao
  • Project 2: Contains an interface with wcf
    attributes as well
  • Project 3: Contains no interface but just the wcf
    service

Both the dao and the wcf service implemented the same interface from project 2. Would having the wcf attributes on the interface have had any adverse effects when using it with the dao? One issue I may have is that the wcf interface may eventually have extra functions that the base interface does not and so I think this previous structure would have been wrong. Truth be told I have no idea.

I know I am probably not explaining it very clearly and there are actually two or even three questions involved here but it is the best way to put it across. I guess my three main questions are as follows:

  1. Which inheritance/implementation structure would be best and why?
  2. Would implementing the same interface used by a wcf service in a
    normal class have any ill effects (caused by the wcf attributes i.e. [ServiceContract], [OperationContract]).
  3. Would overriding all of the methods provided by a base interface be
    correct?
  • 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-06-08T09:14:23+00:00Added an answer on June 8, 2026 at 9:14 am

    The structure you first defined is fine, you have an interface that implements an interface and the child interface can add new methods that aren’t in the base. However, you don’t need to define the base methods in the child interface because they are all inherited so right now your child interface would be empty. And in this model the child interface can have the WCF attributes.

    Now, are you going to have to implement all of those methods in the WCF service? Quite simply yes because that’s what interfaces do – they define a contract that must be implemented.

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

Sidebar

Related Questions

I have seen the solution to this a while back, but can't seem to
I have searched for a general solution to this but only find answers to
I have been trying to find a solution to this one but could not
I have read several forums but can't find the solution to this. int sIndex
I have a project structure that looks like the following: [Solution Name] doc (documentation)
Let's say we have a solution with the following structure: Project.DAL - Data access
I have a solution that contains several projects. One of the test projects is
I have a test solution (TestSolutionA) which contains a test project (TestProjectA: containing system
I have Solution with web site MyProject. I need publish this web site. In
I searched for an implementation of std::map runtime ordering and have found this solution:

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.