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
2
votes
0 answers

SqlMetal (v7.1) still bombs when getting a sproc with a table-valued param in SqlServer 2008 instead of Skipping and Continuing

According to this post: https://connect.microsoft.com/VisualStudio/feedback/details/362523/sqlmetal-error-when-used-on-a-database-with-a-table-valued-parameter#tabs and several other posts I've found containing a list of features and bug fixes for…
Aleah
  • 21
  • 2
2
votes
1 answer

How to split up large sql metal c# entity file

I used sql metal to generate a c# entity file for the database that I'm using. The end result is a 6mb file with many entity classes inside, this takes a long time to load up in visual stuido. Is it possible to generate a single cs file per…
setebos
  • 521
  • 1
  • 4
  • 10
2
votes
4 answers

ASP.NET MVC Update Model Doesn't Work?

I'd like to update a Client type entity. [HttpPost] public ActionResult Manage(String id, FormCollection collection) { // Create service ClientService service = new ClientService(); // Read existing client Client c =…
user338195
2
votes
1 answer

Different [DataMember] behaviour in sqlmetal than dbml designer

I've taken over an application using linq-to-sql and now plan to do some major changes to the database. Due to the lack of support for refreshing the model in the dbml designer I'm trying to use sqlmetal instead. However I've run into problems with…
Anders Abel
  • 67,989
  • 17
  • 150
  • 217
2
votes
3 answers

How to use DbLinq SqlMetal for MySQL on Mac?

I'm using Mono/MonoDevelop on Mac OS, and I want an example for using SqlMetal (DbLinq version included with Mono) for LINQ-to-SQL with MySQL database. Oddly, I found many examples for SQLite, but none for MySQL. Examples found for MySQL seems to…
sgy
  • 2,922
  • 2
  • 35
  • 42
2
votes
2 answers

SQLMetal fails to create DBML from SQL Server 2005 database

As the title already says, am I trying to create an dbml-file by using SQLMetal. The background for this action is to create a C#-Codefile which contains all tables, function, views, stored procedures and so on for using it in an…
2
votes
1 answer

Problem with generate *DBML file from *SDF with SqlMetal util

I try generate dbml from sdf file. So I localize sqlMetal util in: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin Sdf DB file path: D:\DB_TEST\Spiri_SQL_CE_DB.sdf So I try this command on generate dbml file: C:\Program Files…
user572844
2
votes
0 answers

VS2010 DBML Designer renames associations

We manage the structure of our database using a SQL Server Data Tools project (.sqlproj), creating new objects in Visual Studio and publishing them to the SQL Server instances (directly or by generating a publish script). SSDT automatically names…
Emyr
  • 2,351
  • 18
  • 38
2
votes
1 answer

SQLmetal, is it only a mapper for linq to sql?

Is the code gen tool sqlmetal only a mapper to linq to sql? I'm looking for something that will create common CRUD operations also like: GetUserByID UpdateUserByID InsertUser GetAllUsers etc.
Anonymous Cow
2
votes
2 answers

OneToOne relation (cardinality) in LINQ to SQL with SQLMetal

Is there any possibility to set OneToOne relation (cardinality) when generate dbml with SQLMetal? By default dbml schema generated with the OneToMany relation.
Sasha
  • 1,958
  • 1
  • 19
  • 33
2
votes
1 answer

LINQ to SQL: Composite FK only half nullable

In a multitenant application that uses composite keys (e.g. SiteId, $(Table)Id) for everything, I have the following two tables: Owner ( SiteId bigint NOT NULL, OwnerId bigint NOT NULL, ThingId bigint NULL ) Thing ( SiteId…
Jacob Krall
  • 28,341
  • 6
  • 66
  • 76
2
votes
0 answers

Generating dbcontext with sqlmetal creates my table value UDF columns as nullable

I've created a inline table UDF which have some various columns of different types. ALTER FUNCTION [dbo].[fnTest]() RETURNS TABLE AS RETURN ( SELECT [t0].[type], [t0].[status], [t0].[createdDate], -- datetime not…
2
votes
2 answers

Could anyone explain me the difference in the following 2 queries?

I'm working with SqlMetal (linq to sql) in order to retrieve stuff from the database. However, im getting different results using the following code: var record1 = Enumerable.FirstOrDefault(_dataContext.StaticPageLangs, r…
Robin
  • 527
  • 5
  • 16
2
votes
1 answer

I can setup LINQ to SQL in VC2010 fine, so why is SQLMetal relevant?

I am new here so hello. I am using ASP.NET 4 and I am using LINQ to SQL for my data controls. As advised I create a DBML (LINQ to SQL Class Item) and then drag on the relevant tables from SQL Server. I then use this DBML in my code with LINQ ie: …
EdB
  • 449
  • 6
  • 21
1
vote
1 answer

Use SQLMetal on SQL Azure Database

For reasons that I would not like to discuss, our master database schema is currently only in SQL Azure. We are working on bringing it down locally using a tool like Enzo Backup (we're waiting on their developers to fix some bugs we got when…
mellamokb
  • 56,094
  • 12
  • 110
  • 136