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. Web Development
  3. ASP.NET
  4. C# work with linq to sql

C# work with linq to sql

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasequestionsql-serverlinq
2 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.
  • C Offline
    C Offline
    classy_dog
    wrote on last edited by
    #1

    I have a C#.net 2010 web form application that I need to add two tables to the database. This application uses linq to sql. Can you tell me if I want to add these two new tables to the sql server 2008 r2 database, do I 1. Need to remove the original .dbml file and recreate the .dbml file? 2. I would think I can just add two tables to the database and somehow refresh the existing .dbml file. If this possible? Whatever your answer is to the question, can you tell me how to solve this problem?

    D 1 Reply Last reply
    0
    • C classy_dog

      I have a C#.net 2010 web form application that I need to add two tables to the database. This application uses linq to sql. Can you tell me if I want to add these two new tables to the sql server 2008 r2 database, do I 1. Need to remove the original .dbml file and recreate the .dbml file? 2. I would think I can just add two tables to the database and somehow refresh the existing .dbml file. If this possible? Whatever your answer is to the question, can you tell me how to solve this problem?

      D Offline
      D Offline
      DeDawg
      wrote on last edited by
      #2

      classy_dog, double click on the dbml file and on the view menu choose server explorer add a link to the server your database is modeled from (you may already have one), you can click in any white space in the dbml diagram and look at the properties->connection->connection string to get the connection string. Once you have the server connection you can just drag the table(s) into the diagram.

      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