Reputation: 17565
I'm working on a C# project, using a SQL Server database. I have been asked to add the possibility to work with another database.
The current database handling is done via some <db_Name>DB.dbml
files and their corresponding files, so I'd like to have some file like that for the new database.
First, I have created the *.dbml
file myself, I've added a corresponding *.layout
file but that seems not to work out.
Then, I figured "Why not let Visual Studio such a file and I will fill it in afterwards", but this led me to this other question, where the accepted answer mentions doing an "Add new item", and then make the right choice in the "Data" chapter ("Linq-to-SQL classes"), but I believe this screenshot clearly explains my problem:
Now I have two choices:
*.dbml
files (and layout and designer files) manually and hope I will get it to work.LinQ-to-SQL
feature (or its replacement).Can anyone give me a clue? And in case LinQ-to-SQL
is replaced by another feature, what's the name?
Edit:
After some comments, I've decided to install the LinQ-to-SQL feature in my Visual-Studio environment. Main reason for this is that I don't have the time to learn about a new technology at this moment, so I'd like to continue where my predecessor ended.
After having installed LinQ-to-SQL, I can indeed see this in the "Add new item" dialogbox, as you can see here:
... but first I'd like to learn how such an existing *.dbml
file is configured, using that tool, so I double-click on an existing *.dbml
file but the result is a bit disappointing:
At the right side, I do have some stored procedures, which seem to be correct.
The left part mentions using the Server Explorer for seeing connections to other servers, but in there there seem to be no Data Connections (which I suppose are needed). I know I have the possibility to add other servers, but I was hoping to see the already configure ones. In top of that, when I try to add more, a list of server names seems to be generated automatically, but this list is incomplete and adding one manually yields errors.
Now what?
Upvotes: -4
Views: 92