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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:32:25+00:00 2026-05-13T14:32:25+00:00

I am following Rob Conery MVC Storefront tutorial series and I get an Inconsistent

  • 0

I am following Rob Conery MVC Storefront tutorial series and I get an Inconsistent accessibility error from the following constructor public SqlCatalogRepository(DB dataContext) :

public class SqlCatalogRepository : ICatalogRepository
{
    DB db;

    public SqlCatalogRepository()
    {
        db = new DB();
        //turn off change tracking
        db.ObjectTrackingEnabled = false;
    }


    public SqlCatalogRepository(DB dataContext)
    {
        //override the current context
        //with the one passed in
        db = dataContext;
    }

Here is the error message :
Error 1 Inconsistent accessibility: parameter type ‘SqlRepository.DB’ is less accessible than method ‘Data.SqlCatalogRepository.SqlCatalogRepository(SqlRepository.DB)’

  • 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-13T14:32:26+00:00Added an answer on May 13, 2026 at 2:32 pm

    Your DB class is not public, so you can’t make a public method (or constructor) that takes it as a parameter. (What would callers outside your assembly do?)

    You need to either make the DB class public or make the SqlCatalogRepository class (or its constructor) internal.

    Which one you do will depend where your types are being used.
    If the SqlCatalogRepository is only meant to be used inside your assembly, you should make it internal. (internal means that it’s only visible to other types in the same assembly)

    If it’s meant to be exposed by your assembly to other assemblies, you should make the class public but the constructor internal.

    If the DB class itself is meant to be used by types outside your assembly, you should make the DB class itself public.

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

Sidebar

Related Questions

I am trying to get through Rob Conery tutorial MVC StoreFront ans I have
I am working on this mvc project following Rob Connery's storefront video series and
When I try to do that I get the following error: Changes to 64-bit
Following on from my previous question: Simple inner join in linq How would I
I have the following Subsonic 3.0 query, which contains a nested NotIn query: public
In book named Using C++ by Rob McGregor there is following example of using
Following the way Rob does it, I have the classes that are generated by
Im trying to achieve the following: A certain page will have a series of
I have a table like the following: owner Pet __________ Bob Joe Sam Rob
following piece of code: class a{ public function __get($key) { if($key == 'obj') {

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.