Hi, I have two tables as employee id int primary key, purchase_order_product int, bundle int fabric_bundles id int primary key, purchase_order_product int, bundle int, quantity I want to make assciation between employee and fabric_bundles via purchase_order_product and bundle

Member Avatar
Member Avatar
+0 forum 3

I am trying to combine the data from two repositories in MVC4. I am using a join statement in my Action function to gather information from two tables. I am passing this this data onto my view. I am a little confused to how to correctly combine the data from the two repositories. Some help would be appreciated. THANKS! In controller: public IOwnerRepository OwnerDB; public IDwellingRepository DwellingDB; public OwnerController() : this(new OwnerRepository(), new DwellingRepository()) {} public OwnerController(IOwnerRepository oRepository, IDwellingRepository dRepository) { OwnerDB = oRepository; DwellingDB = dRepository; } Action: public ActionResult Account(int id, int? activelink) { // Link values // …

Member Avatar
Member Avatar
+0 forum 1

I have a foreign key linking two models. One is called ZumaDirectors, the other ZumaConsolidated. For some reason I cannot access fields on ZumaConsolidated from ZumaDirectors using foreign key. I can do this without a problem on ZumaDirectors with a foreign key linked to another table. I want to be able to do eg. p=ZumaDirectors.all_directors_key.company_name but when I try this I get this error: "Attribute error: long object has no attribute 'company_name'. The same error applies for any field I try and access. Here are the models. I am tearing my hair out and would be glad for any help. …

Member Avatar
Member Avatar
+0 forum 1

The End.