I currently have a working CRUD application built using ASP.net MVC 4 and the Entity Framework. I use an EDMX model for the tables, which are deployed in a database on a live server.
I want to know how to query the tables in my controllers to return a view which contains columns from each table (join), as one table, based on a column header returned from a query string
These are my tables, I have getters and setters for them in their respective models and the model is "Model1.edmx"
AccCompany AccControl
ID ID
Code ControlCode
CompanyID Nominal
AccountsCompany CostCentre
Company Department
I just don't understand how to join the tables using custom methods, as the MVC framework. EF seemed to do everything itself - in terms of the actual query...