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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:00:06+00:00 2026-06-13T07:00:06+00:00

I have copied my code across into a new project and I am failing

  • 0

I have copied my code across into a new project and I am failing to see any .mdf or .log files generated after running. Under Data Connections I can see and interact with the tables in the database, yet no files are created within the App_Data folder.

Here is my DB context class:

public class BareCupboardDB : DbContext
{
    public DbSet<Recipe> Recipes { get; set; }
    public DbSet<NutritionalValue> NutritionalValues { get; set; }
    public DbSet<RecipeStep> RecipeSteps { get; set; }
    public DbSet<Ingredient> Ingredients { get; set; }
    public DbSet<RecipeIngredient> RecipeIngredients { get; set; }
}

My Application_Start() code:

protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();

        WebApiConfig.Register(GlobalConfiguration.Configuration);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        BundleConfig.RegisterBundles(BundleTable.Bundles);
        AuthConfig.RegisterAuth();

        //System.Data.Entity.Database.SetInitializer(new BareCupboard.Models.RecipeContextInitializer());
        Database.SetInitializer(new CreateDatabaseIfNotExists<BareCupboardDB>());

        var context = new BareCupboardDB();
        context.Database.Initialize(true);
    }

And my connection string:

<add name ="testConnection"
     connectionString="data source= .\SQLExpress;Integrated Security=SSPI;Initial Catalog=BareCupboardDB"
     providerName="System.Data.SqlClient"/>

As far as I can see, this should absolutely generate my database files.

I appreciate any help.

Many thanks.

  • 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-13T07:00:14+00:00Added an answer on June 13, 2026 at 7:00 am

    Your connection string is to an SQL Server instance so you should find the tables in there. You can use SQL Management Studio to have a look

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

Sidebar

Related Questions

I have copied some files across from one project to another. The code simply
In my project, I have created a code snippet which can be copied and
I have copied some files from project A to project B, both of which
I have copied a project from my old XP machine to my new Win7
I'm getting an error. Here's the code copied across to a Console project and
I have this sample code for async operations (copied from the interwebs) public class
I have three arrays and I have copied all these arrays into a single
I have a grails project that depends on some native code, which will vary
I have copied the code from the following example on the Apple Developer site.
i have copied this code from the FB.init documentation : <script src=http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US type=text/javascript></script> ...

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.