Gcobani Mkontwana

Gcobani Mkontwana

  • 564
  • 1.9k
  • 403.6k

How to bind many models in one single View?

Nov 2 2021 9:46 AM

Hi Team

 

I have two models and want to bind them one single view, somehow i am struggling to achieve this. Let me share my logic below;

 

public class ApplicationName
 {
     public int PNR { get; set; }

     public string FIS { get; set; }
     public string Telegrams { get; set; }

     public string Transaction_Code { get; set; }

     public string TS_Logs { get; set; }

     public string Readers_Logs { get; set; }

     public List<TrackingDropDown> TrackingName { get; set; }

 }

public class SystemApplication
  {
      public int SystemID { get; set; }
      public string Optimo { get; set; }

      public string RACS { get; set; }


      public string Stacker_Cranes { get; set; }


      public string BIW_Services { get; set; }

      public string IP_Services { get; set; }


      public string KP_Services { get; set; }

      public List<NameDropDown> NameDrops { get; set; }

  }

@using CheckTimeLine.Models
@model CheckTimeLine.Models.ApplicationName

@{
    ViewBag.Title = "Home Page";
}


Answers (5)