There is a difference between connecting to the database using a class and the visual studio: Tools>Conect_to_database?

Asked

Viewed 57 times

1

I am learning C# and would like to know if there is a difference between the two types of connection cited in the title. If so, which?

  • Difference in what sense? There is much or nothing.

  • I am new in C#, I want to create an application to include/change/update the data in the database. I saw several videos related to this, where a class is created that makes this connection. However, there is also this other option. What I wanted to know is if I will have the same results in both ways. Thank you.

2 answers

1

Friend, it depends on how you design your application. I am working on a C# Winforms application and I am using the Code First methodology. Therefore, every connection process is done via code. I have no connected visual objects. If you are going to develop Delphi style, you can connect via objects on the design screen, but I have no experience with this mode.

I do not know who gave -1 in your question, I found it unnecessary, since it is a question of beginner.

  • Thank you, friend! Also did not understand this revolt with my question rs, but alright.. vlw!

  • quiet, if you are starting something new, use code first. It is much better and easier to understand the system.

0


Serve for different things in Visual Studio links to the database to create and administer it (create database logic as tables relations etc...). In your app you will call to enter and process the data. The logic will be in VS creates the table and its fields... in the application you insert the data provided by the user in the database respecting the structure you created in VS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.