Questions tagged [sqlmetal]

The SqlMetal command-line tool generates code and mapping for the LINQ to SQL component of the .NET Framework.

The SqlMetal command-line tool generates code and mapping for the LINQ to SQL component of the .NET Framework.

93 questions
1
vote
2 answers

C#: Add data to an SQLMetal generated database class?

I used SQLMetal to generate a code file representing my database, and i can't figure out how to add entries to the database from the SQLMetal generated classes. How do i do this? do i just add to the various properties or something?
RCIX
  • 38,647
  • 50
  • 150
  • 207
1
vote
1 answer

MSLinqToSQLGenerator generates different output than SQLMetal

I have a rather large DBML file and recently discovered that Visual Studio's MSLinqToSQLGenerator is generating different output than: SqlMetal.exe All.dbml /code:All.designer.vb /namespace:LINQ2FSE /pluralize /provider:SQL2005 It seems to have…
BlueMonkMN
  • 25,079
  • 9
  • 80
  • 146
1
vote
1 answer

Can I tell SqlMetal to not add INotifyPropertyChanging and INotifyPropertyChanged?

I'm currently using SqlMetal to generate a data context for a SQL Server Compact Edition 3.5 database. This database will be used in a Windows Phone 7 application, and will only be read from. For this reason I'd like to skip the logic to track…
James Skemp
  • 8,018
  • 9
  • 64
  • 107
1
vote
0 answers

How do I set Auto-Generated-Values and Auto-Sync with SQL Metal or in Code

It's 1:30am for me now, so I'm sorry if there are any confusing bits in here.. it seems to make sense in my head.. :-) I've been using SQLMetal to generate a data context for my database tables... I used the command: sqlmetal.exe…
Ads
  • 2,084
  • 2
  • 24
  • 34
0
votes
1 answer

sqlmetal.exe adding a namespace to the partial classes automatically

Is it possible to add a namespace to all the partial classes that sqlmetal.exe generates? I could do this manually but would like it automate it.
John
  • 487
  • 8
  • 16
0
votes
1 answer

Collection Bind to expanded View won't update when new Items are added

I am using a Expander View in my MainPage that is Bind to a collection of "Account Categories" (each item in this collection has further a collection of Accounts) The Bindings are all working fine, with a small glitch though. There is another page…
Supreet
  • 831
  • 1
  • 9
  • 30
0
votes
1 answer

sqlmetal.exe run and output generated but how do I query my database?

I have run sqlmetal.exe agaisnt my database. SqlMetal.exe /server:server /database:dbname /code:mapping.cs I have included this into my solution. So I can now create an object for each of the database tables. Great. I now wish to use ling to query…
John
  • 487
  • 8
  • 16
0
votes
2 answers

can anyone think of why using this particular class in a design time data source will break all design time bindings?

I generated this class using SQLMetal.exe. It is very bindable at runtime, but if I use this class at design time, all of my design time blend bindings are busted. I am using the MVVM-Light framework and I am building an app for WP7. If I extract…
0
votes
1 answer

How to map a database?

I've created a *.dbml file through sqlmetal tool, which contains a diagram of my database (MSSQL). But, my database has 266 tables and if I open that file in VS2008 and export it via PDF, I've got a terrible document. VS2010 will hung up when…
sinkien
  • 289
  • 1
  • 3
  • 11
0
votes
1 answer

How to Use VS2008 Command prompt to generate Database Class from sqlCe Db

created a sqlce Db with VS2008 and save a copy in C:\ Temp08. can someone point out what was wrong with this Sqlmetal syntax : sqlmetal c:\Users\DELL\Documents\Temp08\NtwContacts.sdf/…
MilkBottle
  • 4,242
  • 13
  • 64
  • 146
0
votes
1 answer

C# SQLMetal generated code

Hei, SQLMetal generates code like this: [Column(Storage = "_specimen", DbType = "VarChar(100)")] public string Specimen { get { return this._specimen; } set { if…
hs2d
  • 6,027
  • 24
  • 64
  • 103
0
votes
2 answers

Run web app code from command line?

I have an ASP.NET web application that includes code for enforcing its own database schema ; this code runs on application start. I've recently started using LINQ to SQL, and I've added a pre-build event to run SqlMetal on my database so that I get…
Herb Caudill
  • 50,043
  • 39
  • 124
  • 173
0
votes
2 answers

How do I exclude the Scheme name from SqlMetal generated Objects?

SqlMetal is creating object names such as... The View: Sales.ProductDescription is created as: Sales_ProductDescription Ideally SqlMetal would create the ProductDescription class under a namespace .Sales. but thats probably too much to ask for. …
Justin
  • 10,667
  • 15
  • 58
  • 79
0
votes
1 answer

How should I correctly compose my Linq query where the condition is set to a foreign entity

The following are sample data for the purpose of explaining this matter: tblPrimary 1, John, 2011-01-03T11:12:00z 2, John, 2011-02-04T10:54:12z tblDetail: 1, 1, 14, Dept01 2, 1, 12, Dept02 3, 2, 10, Dept03 4, 2, 17, Dept04 Using the above example…
0
votes
2 answers

generating .dbml using SQLMetal

I'm new to LINQ to SQL. I have tried Object Relational Designer(O/R Designer) Approach to generate classes and worked well. But, I wondering is there any way I can generate the same .dbml file for my database using SQLmetal tool. can anyone please…
TJP
  • 85
  • 1
  • 12