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. Create database from DBML file

Create database from DBML file

Scheduled Pinned Locked Moved .NET (Core and Framework)
databasesysadminquestion
4 Posts 3 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.
  • M Offline
    M Offline
    Manuel Then
    wrote on last edited by
    #1

    Hi :) Some time ago I created a Linq2Sql DBML file. Now I want to create the same database on a test server without having access to the original DB. Is there any way to create the database from this file without doing it manually? Thanks in advance. Greetz! M.T.

    S M 2 Replies Last reply
    0
    • M Manuel Then

      Hi :) Some time ago I created a Linq2Sql DBML file. Now I want to create the same database on a test server without having access to the original DB. Is there any way to create the database from this file without doing it manually? Thanks in advance. Greetz! M.T.

      S Offline
      S Offline
      Sam Xavier
      wrote on last edited by
      #2

      Unfortunately, there is no way to create a database file from a DBML file.

      Best Regards, Sam Xavier www.componentone.com

      M 1 Reply Last reply
      0
      • S Sam Xavier

        Unfortunately, there is no way to create a database file from a DBML file.

        Best Regards, Sam Xavier www.componentone.com

        M Offline
        M Offline
        Manuel Then
        wrote on last edited by
        #3

        Okay. Thanks :) By now I already did it manually ;) Greetz! M.T.

        1 Reply Last reply
        0
        • M Manuel Then

          Hi :) Some time ago I created a Linq2Sql DBML file. Now I want to create the same database on a test server without having access to the original DB. Is there any way to create the database from this file without doing it manually? Thanks in advance. Greetz! M.T.

          M Offline
          M Offline
          MisterX44
          wrote on last edited by
          #4

          The generated ModelNameDataContext class has a CreateDatabase Method. This creates the database with the tables in the model. Best regards, MisterX44.

          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