Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. MVC 4 Local Database

MVC 4 Local Database

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharpasp-netdatabasevisual-studio
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AnCristina
    wrote on last edited by
    #1

    Hello ! I want to build a MVC 4 app database using Entity Framework Code First . I have the following problem : I've tried to create a local database with 2 tables in it (I declared 2 classes and then attached them in a DbContext class) , and then wrote the following connection string :

    The database doesn't seem to be created after running the application , since it doesn't appear in the Server Explorer and in the App_Data Folder . I use Visual Studio 2012 . Can you please help me solve this problem ?

    A 1 Reply Last reply
    0
    • A AnCristina

      Hello ! I want to build a MVC 4 app database using Entity Framework Code First . I have the following problem : I've tried to create a local database with 2 tables in it (I declared 2 classes and then attached them in a DbContext class) , and then wrote the following connection string :

      The database doesn't seem to be created after running the application , since it doesn't appear in the Server Explorer and in the App_Data Folder . I use Visual Studio 2012 . Can you please help me solve this problem ?

      A Offline
      A Offline
      AmitGajjar
      wrote on last edited by
      #2

      Hi, Check http://msdn.microsoft.com/en-us/data/jj193542.aspx[^] Video. This may give you some idea or may be lead to solution for your problem. Have you tried to use SQL server instead of local database server ?

      A 1 Reply Last reply
      0
      • A AmitGajjar

        Hi, Check http://msdn.microsoft.com/en-us/data/jj193542.aspx[^] Video. This may give you some idea or may be lead to solution for your problem. Have you tried to use SQL server instead of local database server ?

        A Offline
        A Offline
        AnCristina
        wrote on last edited by
        #3

        I managed to solve the problem by creating the model using an existing database . Thanks !

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups