M
M
Maria2016-05-25 22:23:45
WPF
Maria, 2016-05-25 22:23:45

How to display relational database data in gridview?

Good day.
Help, please, to solve the problem. There is a simple database of 5 connected tables, aQSfZqb.pnghow to display the data of the WorkOrded table in a gridview or some other control so that instead of field IDs of the fields of connected tables OcAm2w7.pngthere are fields of interest to me, for example, Operator.Fullname, Forester.FullName, Forest.ForestName, etc. I'm trying to figure out how to do this using the Entity Framework, but I'm stuck and can't move without your help. SQL query I get the required data

SELECT        WorkOrder.Date, WorkOrder.CompleteStatus, Forester.FullName, Forest.TreeType, Forest.Square, Forest.ForestName
FROM            WorkOrder INNER JOIN
                         Forester ON WorkOrder.idForester = Forester.id INNER JOIN
                         Forest ON WorkOrder.idForest = Forest.id
but that's not exactly what I need.
Thank you very much for your attention, I will be very grateful for any help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question