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

  • Home
  • SEARCH
  • 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 4034632
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:59:47+00:00 2026-05-20T11:59:47+00:00

I am using the Service/Repository/EF/POCO pattern in a MVC app, and had a couple

  • 0

I am using the Service/Repository/EF/POCO pattern in a MVC app, and had a couple questions about the Interfaces.

1) Should I make an Interface per Service?
2) Should I make an Interface per Repository?

Or, should I have a generic interface per layer (IService(Of T), IRepository(Of T)).

What I dont understand is how in the controller say, it takes a IService(Of Category) interface in it’s constructor, how do I implements the methods in the concrete class?

Public Class HomeController
    Inherits System.Web.Mvc.Controller

    Private _Service As IService(Of Category)

    Public Sub New(ByVal Service As IService(Of Category))
        _Service = Service

    End Sub

    Function Index() As ActionResult

        Return View()
    End Function

End Class

The _Service does not have the methods of my concrete CategoryService class?

Make any 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-20T11:59:48+00:00Added an answer on May 20, 2026 at 11:59 am

    Use concrete interface for service. If your services can be described by generic interface you most probably don’t need them at all. Generic interface is often used for repositories because repositories usually offer same core methods.

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

Sidebar

Related Questions

I have an MVC-based site, which is using a Repository/Service pattern for data access.
I am using the MVC pattern in ASP.NET using service (BLL) and repository layers
We are using a WCF service layer to return images from a repository. Some
I'm using EF4 with POCO objects the 2 tables are as follows Service ServiceID,
I have projects set up as follows: Data - repository. Service Web I'm using
I'm using the repository pattern. I have a Country repository that I'm using a
I'm looking at using a Windows SharePoint Services 3.0 wiki as a metadata repository.
I've been learning C++, coming from C#, where I've gotten used to using service
I wrote a windows service using VB that read some legacy data from Visual
I've written a web service using ASP.NET (in C#) and I'm attempting to write

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.