T
T
TOTOKOT2021-04-27 09:59:07
WPF
TOTOKOT, 2021-04-27 09:59:07

How to display all rows with specific id in datagrid from MYSQL management studio in wpf application?

there is a certain variable N in which the id is stored, by which it is necessary to get all the lines from the given table from the database where this id occurs. How is it implemented here?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Baryshev, 2021-04-28
@AVollane

Hello! Are you using Entity Framework? If not, then install the Nuget package, create a data context, specify the connection string in the configuration file. In the class where the context is located, create a DataSet, as well as models to work with data from the database as with objects (you can find how to do all this correctly on the Internet, even in the official documentation). Then you can use LINQ in the code to make the necessary selections. As I understand it, your ID is not a foreign key of the database?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question