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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:52:10+00:00 2026-05-22T14:52:10+00:00

In MVC 2 I am working on something and have ran into a snag.

  • 0

In MVC 2 I am working on something and have ran into a snag. I got my repository put instead of putting in the same class the interface is I have it same project as the EDMX file.

Initializing StructureMap is what’s killing me at this point. Here’s where I’m initizing StructureMap (in Global.asax.cs.)

ObjectFactory.Initialize(x =>
    {
        x.ForRequestedType<IUnitOfWorkFactory>()
            .TheDefaultIsConcreteType<EFUnitOfWorkFactory>()
            .CacheBy(InstanceScope.HttpContext);

        x.ForRequestedType(typeof(IRepository<>))
            .CacheBy(InstanceScope.HttpContext)
            .TheDefaultIsConcreteType(typeof(GenericRepository<>));
    });

The Namespace for this project is GpdsCreationTaxidermy.Data (which is the same Namespace as my GenericRepository.cs). I would post the code for this file but I dont believe that is the problem here. In my Global.asax I import the proper Namespace

using GodsCreationTaxidermy.Data;

The error I’m getting is:

Error 3 The type or namespace name
‘GenericRepository’ could not be found
(are you missing a using directive or
an assembly reference?)

Also attached is an image showing this particular projects layout

enter image description here

Can someone help with this issue, or what I’m doing wrong here

EDIT I have even tried adding GodsCreationTaxidermy.Data to the file name and still no luck.

  • 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-22T14:52:11+00:00Added an answer on May 22, 2026 at 2:52 pm

    Thanks for sending the files 🙂

    It looks like the definition of GodsCreationTaxidermy.Data has changed.

    This is what I did to fix the problem:

    Remove these references from GodsCreationTaxidermy.Data.Repository Class Library:

    • GodsCreationTaxidermy.Data
    • GodsCreationTaxidermy.Data.Repository

    Remove these references from GodsCreationTaxidermy.Data Class Library:

    • GodsCreationTaxidermy
    • GodsCreationTaxidermy.Data

    Remove the reference to GodsCreationTaxidermy.Data in the GodsCreationTaxidermy MVC project and re-add the reference, choosing GodsCreationTaxidermy.Data from the Project tab

    Hopefully that’ll get the GenericRepository working 🙂

    I did notice that the following line no longer works though:

    EFUnitOfWorkFactory.SetObjectContext(() => new GodsCreationTaxidermyEntities());
    

    GodsCreationTaxidermyEntities doesn’t seem to exist in GodsCreationTaxidermy.Data any more. Does that cause you an issue?

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

Sidebar

Related Questions

I'm working on an asp.net MVC application. I have a class that wraps a
Last night I tried to put together something that I have had working since
I have just started working in jQuery and ASP.NET MVC. I want the same
I am working on mvc project, with repository pattern and entity framework, now on
I working on my first ASP.net MVC project and and i got some problems
Had something weird start happening to me today. I have an asp.net mvc app
Do you have a working example of a Rails3 mvc application? How will it
I have an MVC application with a single model and several views (something like
I'm working on an ASP.NET MVC site which will have a database. While I'm
I have an ASP.NET MVC 2 form that is working perfectly, doing client side

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.