Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Tables not appearing as classes

Tables not appearing as classes

Scheduled Pinned Locked Moved C#
databasecsharpsql-servervisual-studio
5 Posts 3 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hesam emami
    wrote on last edited by
    #1

    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

    D R 2 Replies Last reply
    0
    • H Hesam emami

      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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      H 1 Reply Last reply
      0
      • D 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

        H Offline
        H Offline
        Hesam emami
        wrote on last edited by
        #3

        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?

        D 1 Reply Last reply
        0
        • H Hesam emami

          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?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • H Hesam emami

            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

            R Offline
            R Offline
            RedDk
            wrote on last edited by
            #5

            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[^]

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups