Tables not appearing as classes
-
I use Winform and I use Entity Framework to communicate with the database and I use the MSSQL database and when I want to connect the SQL database to the Visual Studio program, the table Those that exist in my database are not present as classes in the Visual Studio program
-
I use Winform and I use Entity Framework to communicate with the database and I use the MSSQL database and when I want to connect the SQL database to the Visual Studio program, the table Those that exist in my database are not present as classes in the Visual Studio program
If you're talking about using the Data Sources tab in Visual Studio to connect to the database, and you're using Entity Framework, you're doing it wrong. The Visual Studio designers will not create classes for Entity Framework. You have to write the classes yourself.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
-
If you're talking about using the Data Sources tab in Visual Studio to connect to the database, and you're using Entity Framework, you're doing it wrong. The Visual Studio designers will not create classes for Entity Framework. You have to write the classes yourself.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
If I connect the data base to Visual Studio and create my own classes, will Visual Studio connect my classes to the tables in the data base?
-
If I connect the data base to Visual Studio and create my own classes, will Visual Studio connect my classes to the tables in the data base?
It appears you have no idea what Entity Framework is or how it works, correct? Visual Studio isn't going to do anything for you when using Entity Framework, nor should you rely on it. Using the designers in Visual Studio hides a bunch of details from you that makes learning how to interact with databases more difficult to learn. You don't need anything from Visual Studio to work with databases.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
-
I use Winform and I use Entity Framework to communicate with the database and I use the MSSQL database and when I want to connect the SQL database to the Visual Studio program, the table Those that exist in my database are not present as classes in the Visual Studio program
Downloads: Generic Database Access[^] This a HUGE Codeproject article which, from the looks of things (quick scroll through the .zip content), is likely to give out many C# programming secrets wrt SQL Server (even) with no further sacrifice of time searching on your part. Generic Database Access[^]