locked
Will LINQ to SQL Designer DBML and SQLMetal DBML be the same schema? RRS feed

  • Question

  • The LINQ to SQL DBML schema for Beta1 doesn't match the SQLMetal generated DBML file using the /XML option.  Since both of these are using .dbml file extensions, shouldn't the files be interchangeable?  Shouldn't I be able to take the SQLMetal dbml file and load it into the Designer, and shouldn't I be able to generate source code using SQLMetal from the Designer's dbml file?

     

    Are there any plans for this?  Will it be in Beta2, RTM, never?

     

    Thanks.

     

     

    Wednesday, June 27, 2007 2:49 AM

Answers

  • Hi Joe,

     

    Starting with Beta 2 SQLMetal and the designer both use the same DBML schema. You will be able to open SQLMetal generated files in the designer. SQLMetal and the designer will also share the same code generator so it should be possible to take a DBML file from the designer and generate the same code using SQLMetal.

    Wednesday, June 27, 2007 5:21 PM

All replies

  • Hi Joe,

     

    Starting with Beta 2 SQLMetal and the designer both use the same DBML schema. You will be able to open SQLMetal generated files in the designer. SQLMetal and the designer will also share the same code generator so it should be possible to take a DBML file from the designer and generate the same code using SQLMetal.

    Wednesday, June 27, 2007 5:21 PM
  • Awesome!  Thanks for responding.  For some reason, I just got an email that someone responded to this post.  I just got an email for another post that was made several days ago too.  How odd.
    Thursday, July 5, 2007 10:05 PM
  • Hi,
    I'm using Beta 2. I have generated the .dbml file in Visual Studio. Now I would like to automate the process using SqlMetal.exe. I see that they are creating files using the same schema, however the contents are slightly different. For example in the sqlmetal generated dbml file the foreign keys have an FK prefix and sometimes different names depending on FK name length I think.
    Also for tables that start with a lower case letter, such as the ASP.NET membership provider tables, in the sqlmetal generated tables the table names start with upper case. I would rather the table names to match excactly.
    Is there a way that I can customize this process to generate the same exact file?

    Thanks,
    Sayed Ibrahim Hashimi
    www.sedodream.com
    Saturday, October 6, 2007 1:36 PM
  •  

    Hi!

    I have the same question: is there a way to prevent sqlmetal.exe from upper-casing the first letter in table names and field names?

     

    Thanks in advance.

     

    Micha

    Friday, March 28, 2008 10:47 AM
  • Yes, but you will probably have to have sqlmetal.exe output xml, then alter the XML (eg: using XSLT), then feed the new XML back into sqlmetal.
    Wednesday, November 5, 2008 9:33 PM