Questions tagged [dbml]

For questions specifically about the linq-to-sql dbml file (structure or location) generated by SqlMetal or Visual Studio. Questions about linq-to-sql should be tagged by the [linq-to-sql] tag.

82 questions
0
votes
1 answer

How to make Linq2Sql work with my models

I work on a project where we was using SqlConnection, SqlCommand and plain SQL to access repository. Now, I am trying to migrate to Linq2Sql and I want to use the same models. How can I achieve this? I will reduce the project structure to the…
Yeldar Kurmangaliyev
  • 33,467
  • 12
  • 59
  • 101
0
votes
1 answer

Using dbml file with visual studio

I am developing an asp.net application where some dbml files have been created. When I click on a dbml file called "Test.dbml" and that I unfold it, I get the three following files : Test.cs Test.dbml.layout Test.designer.cs However when I create a…
user2443476
  • 1,935
  • 9
  • 37
  • 66
0
votes
1 answer

MVC web application dll reference to console application

I am working on console application in which I need to refer ddl of MVC web application (wich is built using DBML). When I provide the refernce of my web app to console app it gets built fine but when it comes for DB hit it gets failed; it shows…
Vrishali
  • 42
  • 1
  • 5
0
votes
1 answer

Can't find data source from dbml generated code

I inherited a website and I am trying to find out how a dropdownbox on the site gets filled. The only clues i have to this are two snippets of code...one written by the programmer, one generated from what I thing to be the dbml tool. Heres the…
rigamonk
  • 1,179
  • 2
  • 17
  • 45
0
votes
2 answers

Visual Studio 2013. dbml file not updating

I am working on a Visual Studio project that uses ASP.NET/C# with LinqToSql. All has been going fine, until some changes were made to one of the database tables. After that, the Table in question was removed from the DBML database diagram, and the…
Steve Staple
  • 2,983
  • 9
  • 38
  • 73
0
votes
1 answer

What is bit data type equivalent in DBML?

I'm mapping a column in a DBML to a bit column in SQL Server. Which of the following should "Type" (not server data type) in the DBML be marked as: Binary (System.Data.Linq.Binary) boolean byte
4thSpace
  • 43,672
  • 97
  • 296
  • 475
0
votes
1 answer

Visual Studio C# Change entity variables names for dbml file

I know how to create Foreign Key in sql express and how to use dbml file and it's entities, But I like to change the name of a variable in one of my entities. Let me explain this: Lets think I have a Table named "Person" and this table has a Foreign…
amir.sh
  • 193
  • 6
  • 18
0
votes
0 answers

Generating .dbml file from SQL Server 2008 ONLY IF NOT Sql Server 2000

Is it possible Generating .dbml file from SQL Server 2008 ONLY IF NOT Sql Server 2000 using sql management tools, There is no visual studio installed so that I could use SQLMetal but even with that can I generate .dbml for couple of tables ?
Mathematics
  • 7,314
  • 25
  • 77
  • 152
0
votes
1 answer

DBML how to recover from violation of UNIQUE KEY on insert?

I would like to find out how to recover from Unique Key Violation error in DBML on insert. My scenario: Create a new DBML mapped object (call it A) (possible to be a duplicate but cannot be determined before) and use InsertOnSubmit(A), Then in…
user3218782
  • 111
  • 2
  • 7
0
votes
0 answers

Cannot resolve symbol exception after editing dbml

I am stumped: I have a program that is interacting with several databases. These database connections were made via Server Explorer with all necessary tables brought in. Each table has a ID column that is the primary key in the SQL database. I…
MatthewHagemann
  • 1,167
  • 2
  • 9
  • 20
0
votes
1 answer

IIS Publish on different server choosing dedicated connectionString

In my asp.net website i have multiple connectionstring in web.config. I need to pick a connection string when i publish on my local server for test, and the other one when I have to publish on "real server" when i need to release.