Hello,
I'm using a dropdown list to display a list of campaigns for a user to choose from. The dropdown list is part of a custom editor template for adding/editing donations. The campaigns are stored in a separate table, that has no cardinal relationship with the underlying donations table used by the template. In this use case scenario, the campaign table is being used as a lookup. The donation table simply stores the campaign name, nothing else is required beyond that, so no relationship is required.
The campaigns are being stored in a separate table because campaigns are often edited, added, or deleted independent of the rest of the application. There are also too many of them to either hard code or include in the markup.
For some reason, I'm not able to retrieve the data from the campaign table, something I thought would be pretty straightforward.
I'm including a .zip file containing the following relevant files:
Models
Donation.cs
Campaign.cs
Controllers
DonationsController.cs
CampaignController.cs
Custom Editor Template
DonationTemplate.cshtml
I'm not sure what I've done wrong here. This seems like it should pretty straightforward. Any advice/feedback would be very much appreciated.
Thank you!