Many-to-Many Relationships

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
dmcbrier2
User
Posts: 9

Many-to-Many Relationships

Post by dmcbrier2 »

Any way to do a many-to-many?

Employee Table

  • Id
  • FirstName
  • LastName

Employee to JobTitle Table

  • EmployeeId
  • JobTitleID

JobTitle

  • Id
  • JobTitle

Using ASP.NET Maker 2018 Core 2

I see nothing in the instructions for this?

Thanks.


kirondedshem
User
Posts: 642

Post by kirondedshem »

Please download the demo project and set it up on your machine, then generate and browse it so you can see a sample of some the available features (ensure to browse each page and click every possible button so you can get a feel of what has been implemented), this can also show you how a given functionality has been setup , if you cant set it up on your machine then go to the home page and browse the online demo project to see the same.

BUT Short Version:

You can create a master detail relationship between "Employee Table" and "Employee JobTitle Table", with "Employee Table" as the master table and "Employee JobTitle Table" as the detail table.

this in turn creates a one-many relationship between the two tables and will be able to show the job title records related to a particular employee record while on the employee list page.
HINT: Download or browse the demo project and you can see this in orders list page you can see the related orderdetals->read about "master detail " in help menu

As for showing the JobTitle name from the job title using the link "JobTitleID" in employee job titles, you can set JobTitleID to use lookup table in field settings and link it the job title table.
This will in turn show the job title name automatically for every jobtitleId in employee job titles pages

HINT: Download or browse the demo project and you can see this in orderdetails list page where ProductID shows the name of the product instead of the ID->read about "Lookup table" in help menu


dmcbrier2
User
Posts: 9

Post by dmcbrier2 »

Thank you very much for the detailed description. I will begin looking into this solution. Thank you again for your kind response.


Post Reply