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

The Archive Base Latest Questions

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

I have a web project and I want it to work with ravendb and

  • 0

I have a web project and I want it to work with ravendb and ravendb-embedded.
So this is how I think I should solve it.

Two projects, MvcRavendb and MvcRavendb-Embedded where the two projects references two different nuget packages, one for ravendb and one for ravendb embedded.

In my core project I have an interface IDocumentStoreInitializer which has one method, IDocumentStore InitializeDocumentStore()

MvcRavenDb and MvcRavenDb-Embedded has one class like this

public class RegisterRavenDb : IDocumentStoreInitializer {
    public IDocumentStore InitializeDocumentStore() {
        return new DocumentStore OR EmbeddableDocumentStore();
    }
}

Then I have a class that registers the concrete implementation like this

public class RavenRegistry : Registry {
    public RavenRegistry() {
        For<IDocumentStoreInitializer>().Use<RegisterRavenDb>();
    }
}

So far so good but then I have bootstrapper that configures structuremap like this

public class Bootstrapper {
    public static IContainer Initialize() {
       ObjectFactory.Initialize(x =>
       {
          // here I want to use the registered concrete implmentaiton of IDocumentStore
          var documentStore = new DocumentStore { ConnectionStringName = "RavenDB" };

          documentStore.Initialize();
       }
    }
 }

So how can I tell structuremap to use InitializeDocumentStore from the RavenRegistry class?
Maybe I have missed something or I’m taking the wrong approach here

  • 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-25T14:33:08+00:00Added an answer on May 25, 2026 at 2:33 pm

    Just use the EmbeddableDocumentStore instance, using the connection string, you can control whatever it will be embedded or server/client.

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

Sidebar

Related Questions

I have a very complex web app project I want to re-structure. Naturally, it
I have a file that I want to deploy when my web project (an
The Scenario I have an ASP.NET web project. I want to be able to
I have an ASP.NET web site project that I want to debug, but when
I have a web project that I want to version in SVN. SVN is
I have no domain experience, but I want to start a web project involving
What is the best way to solve this. I have projects the following projects:
I have web application Project having RPC call. one RPC async is working fine.
I have a web project working perfecly on my web server and on my
I have a web application project that works with a quite large database (over

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.