I have a 2 samlple model like this (I have enterd intered the fields whicj I want only )
[Table("TripAllocation", Schema = "dbo")]
public class TripAllocation
{
public int TripAllocationId { get; set; }
public ICollection<Requisition> Requisitions { get; set; }
}
[Table("Requisition", Schema = "dbo")]
public class Requisition
{
[Key]
public int RequisitionId { get; set; }
public int? TripAllocationId { get; set; }
public TripAllocation TripAllocation { get; set; }
}
So Now I want to select values to TripAllocationId in the Requisition table through TripAllocation table. I dant want to do it by creating driodownlist in the requisition view.
I want to do it from TripAllocation table and add list of the Requisitions for a TripAllocationId..
So how can I do this by Using MVC with handling Controller and the View.
(When I creating a Trip, List of Requistion should be applied to one AllocationTripId)