How can i send Relational Data to my Index?

Viewed 10

first of all, I am trying to develop a .net core mvc application for an assignment, but I have a problem. The application requests multi-language support and I made a Language table. I also store the string datatype parts of my main table, the Event table, which require language support, in the EventTranslations table. I can show this part of the data model as in the following screenshot; My Database Model

I want to list all the information about the Event on the Event Index. And I want to display information such as EventName, EventDescription, EventShortDescription with Language ID = 1 on the Event Index. For this, I created a method called "GetEventsWithRelations()" in the EfEventRepository in the DataAccess Layer as seen here. I added other tables with the include method to bring the relational fields into it.

GetEventsWithRelations method

Then I created the Controller as follows

My EventController

I created the Event Index and determined the Model as follows

my model on index

However, I am getting the following error, what should I do to solve it?

Error

0 Answers
Related