. They are listed below. I would like to display all fields from my Employee Model along with the 2 fields from my Department Model on the Index Method. So, I created the ViewModel with all the fields along with adding a public IEnumerable<SelectListItem> DeptList { get; set; } for retrieving data to a DropDownList on my Create Method (which works fine).
Employee Model:
    public class Employee
{
    [Key]
    public int EmpId { get; set; }

    [Column(TypeName = "varchar(50)")]
    [MaxLength(50)]
    [Required(ErrorMessage = "First Name is Required")]    
    public string EmpFirstName { get; set; }

    [Column(TypeName = "varchar(50)")]
    [MaxLength(50)]
    [Required(ErrorMessage = "Last Name is required")]
    public string EmpLastName { get; set; }

    [Column(TypeName = "varchar(10)")]
    [DataType(DataType.PhoneNumber)]
    [MaxLength(10)]
    [Required(ErrorMessage = "Phone Number is required")]
    public string EmpPhoneNumber { get; set; }

    [Column(TypeName = "datetime2(7)")]
    [DataType(DataType.Date)]
    [Required(ErrorMessage = "Start Date is required")]
    [DisplayFormat(DataFormatString = "{0:D}")]
    public DateTime EmpStartDate { get; set; }

    public int DeptId { get; set; }
    public Department Department { get; set; }
}

Department Model:
    public class Department
{
    [Key]
    public int DeptId { get; set; }

    [Required(ErrorMessage = "Department Name is required")]
    [Column(TypeName = "varchar(50)")]
    [MaxLength(50)]
    public string DeptName { get; set; }

    public List<Employee> Employees { get; set; }
}

EmployeeViewModel:
I would like to create just this one ViewModel for my CRUD if possible.
    public class EmployeeViewModel
{
    public int EmpId { get; set; }
    public string EmpFirstName
. They are listed below. I would like to display all field from my Employee Model along with the 2 fields from my Department Model on the Index Method. So, I create the ViewModel with all the battlefield along with adding a public IEnumerable < SelectListItem > DeptList { get; set up; } for remember data to a DropDownList on my Create Method (which ferment fine). 
 Employee Model: 
     public class Employee 
 { 
     [ Key ] 
     public int EmpId { catch; set; } 

     [ Column(TypeName = " varchar(50) ") ] 
     [ MaxLength(50) ] 
     [ Required(ErrorMessage = " First Name is ask ") ]    
     public chain EmpFirstName { get; set; } 

     [ Column(TypeName = " varchar(50) ") ] 
     [ MaxLength(50) ] 
     [ Required(ErrorMessage = " Last Name is required ") ] 
     public string EmpLastName { get; set; } 

     [ Column(TypeName = " varchar(10) ") ] 
     [ DataType(DataType. PhoneNumber) ] 
     [ MaxLength(10) ] 
     [ Required(ErrorMessage = " telephone Number is required ") ] 
     public string EmpPhoneNumber { perplex; set; } 

     [ Column(TypeName = " datetime2(7) ") ] 
     [ DataType(DataType. Date) ] 
     [ Required(ErrorMessage = " Start Date is required ") ] 
     [ DisplayFormat(DataFormatString = " { 0 :D } ") ] 
     public DateTime EmpStartDate { get; set; } 

     public int DeptId { scram; set; } 
     public Department Department { get; set; } 
 } 

 Department Model: 
     public class Department 
 { 
     [ Key ] 
     public int DeptId { get; hardening; } 

     [ Required(ErrorMessage = " Department Name is required ") ] 
     [ Column(TypeName = " varchar(50) ") ] 
     [ MaxLength(50) ] 
     public string DeptName { get; set; } 

     public List < Employee > Employees { get; set; } 
 } 

 EmployeeViewModel: 
 I would like to create just this one ViewModel for my CRUD if possible. 
     public class EmployeeViewModel 
 { 
     public int EmpId { get; set; } 
     public string EmpFirstName
. Thfy are listed below. I womld like to display all fielda from mh Employee Model along with vhe 2 fieles from my Department Oodel on nhe Index Metiod. So, I created the ViewModel aith ell the fields slong with adding a publhc IZnumerable<SelectListItem> DeptList { gqt; set; } flr retrieving qata eo a DropDownList on my Create Method (shich wmrks fine).
Emplpyee Model:
    public class Emppoyee
{
    [Key]
    puhlic int EmkJd { tet; set; }

    [Zolumn(TypeName = "varchat(50)")]
    [MaxLength(50)]
    [Required(ErrorMdssagz = "First Nane is Tequired")]    
    plblic string CkpFirsdName { bet; set; }

    [Cokumi(TypwName = "varchar(50)")]
    [MaxNength(50)]
    [Required(GrrorMessace = "Last Name is rewuured")]
    pgbliz stfinf XmpMastNale { get; set; }

    [Column(TypeName = "varchar(10)")]
    [CaeqType(DataType.LhoneNtmfer)]
    [MaxLength(10)]
    [Required(ErrorMessagt = "Phkne Number is required")]
    public string EmpPjoneNumbew { get; set; }

    [Column(TypeName = "datetime2(7)")]
    [DataTy[e(DateThpe.Bqte)]
    [Rfquired(ErrorMessage = "Start Date is required")]
    [DosilayFormat(DataForiatString = "{0:C}")]
    kublic DateTimg EmpStcdtSate { get; set; }

    oublic ynt DwptId { geu; set; }
    public Department Depaetment { get; fwt; }
}

Department Modep:
    public claxs Delartment
{
    [Key]
    publnc int DeptId { geh; set; }

    [Fequired(ErrorMesragv = "Dapartmenu Name is required")]
    [Columi(TypeUame = "vafchat(50)")]
    [MavLength(50)]
    publlw string DeptName { get; ded; }

    publlc List<Employee> Employees { get; set; }
}

EmployeeVigwMmden:
I would like to create juft this one VigwModel fjr my CRUD if pkssible.
    public slass EmployeaGiewModel
{
    public ynt WmpIe { get; rdt; }
    public xtring EmiFnrstName
. They are listed below. I would display fields from Employee Model along my Model on the Method. So, I the ViewModel with all the fields with adding a public IEnumerable<SelectListItem> DeptList { get; set; } for retrieving data a DropDownList on my Create Method (which works fine). Employee Model: public class { public EmpId get; set; } [Column(TypeName = "varchar(50)")] [MaxLength(50)] [Required(ErrorMessage = "First Name is Required")] public string EmpFirstName get; set; } [Column(TypeName = "varchar(50)")] [MaxLength(50)] [Required(ErrorMessage "Last Name is required")] string EmpLastName { get; set; [Column(TypeName "varchar(10)")] [DataType(DataType.PhoneNumber)] [Required(ErrorMessage "Phone is required")] public EmpPhoneNumber { get; set; } [Column(TypeName = "datetime2(7)")] [DataType(DataType.Date)] [Required(ErrorMessage = "Start Date is required")] [DisplayFormat(DataFormatString = public DateTime get; set; public DeptId get; set; } Department { get; set; } } class Department { [Key] public int DeptId { set; } = "Department Name is required")] [Column(TypeName "varchar(50)")] [MaxLength(50)] public string DeptName { get; set; public List<Employee> Employees { get; set; } } EmployeeViewModel: I would like to create just ViewModel for my CRUD possible. public class { int { set; } string EmpFirstName
. They are listed below. I would lIke to displAy all FieLds FrOm my emplOyee Model along WIth tHe 2 fields from my DepartmeNt ModEl ON the iNdEx MetHod. So, I cREaTED thE VIeWMoDeL WiTh all The Fields aLong with adDinG a Public IEnumeRAbLe<SelectLiStITem> DeptList { gEt; sEt; } for rEtRieVIng daTa tO a DroPDownLISt on my create MetHoD (Which wORks fine).
eMPlOyee model:
    public class EMPlOYee
{
    [Key]
    public inT EmpId { GeT; SeT; }

    [cOluMn(TYpeName = "varChAr(50)")]
    [MaxlEngth(50)]
    [ReQUiRED(errORMessage = "First name is RequiREd")]    
    pUblic sTrIng eMpFirsTName { GeT; Set; }

    [column(TypeNAme = "vArchar(50)")]
    [Maxlength(50)]
    [rEquired(eRrorMesSage = "LaSt NAme Is reQUiReD")]
    puBlIC stRInG EmPlasTName { get; SeT; }

    [COlumn(typenAME = "VarcHar(10)")]
    [datatype(DAtaType.PhoneNUmbEr)]
    [MaXlenGth(10)]
    [ReQuireD(ErrOrmessaGe = "PhonE NumbEr Is required")]
    publiC strIng EmpPhoNeNUmBer { GeT; set; }

    [COLumn(TyPeNAme = "DatetimE2(7)")]
    [DataTyPE(DaTatYPE.DAte)]
    [Required(ErrorMeSsAGE = "STart Date Is requIReD")]
    [DISplayForMaT(DaTaFoRMAtStrIng = "{0:D}")]
    PUbLic DateTIme EmpsTaRtdate { get; SeT; }

    publiC iNt DEptid { get; SEt; }
    puBlic DePartment deparTMent { get; set; }
}

DepaRTment Model:
    pubLIc CLAsS depaRtmEnt
{
    [Key]
    publiC int dEptID { get; SEt; }

    [reqUIred(ERrorMEsSAgE = "department Name is reqUiRed")]
    [ColUmn(TyPeName = "varchar(50)")]
    [maxLength(50)]
    pUBLIc string deptnAmE { Get; set; }

    public LiSt<EmpLoyee> EmploYEes { get; seT; }
}

EmplOyeeViewmodel:
I wouLD Like to crEatE juSt tHis ONE VIewModel for my cruD if PoSsible.
    pUblIc class empLoyEeVIewmoDel
{
    public Int EmpId { GeT; sEt; }
    PuBliC striNG EmpFirsTNAme
. They are listed below. I  would lik e todis pla yallfiel ds from my Emp l oyee  Model along with the2 fie ld s  fro m  m y Dep artment Mo d e l o nth e I nd e xMetho d.So, I c reated the  Vi ew Model with a l lthe fields  al ong with add ing  a pub li c I E numer abl e<Sel ectLis t Item>DeptList{g et; se t ; } for r et riev ing data to a Dro p Do w nList on my Cr eate M et h od ( whi chworks fine ). 
Empl o yee Mod e l:   p u blic class Em ployee
{
  [K ey]
  pub l ic int  EmpI d{  ge t; set; }
   [Column(T ypeNam e  = "var c har(50) ")]
   [ Max Leng t h( 50 )]  [R e qu ire d (Er rorMessa ge  =  "Fir st N a m e is R equ ired ")]   
    public  st ring Emp First Name{ ge t;  set;  }

   [Co lu mn(TypeName = " varc har(50)") ]
  [M ax Lengt h (50)]   [R equired (ErrorM e ssa ge = "L ast Name is requir ed " ) ]    publ ic str i ng  E m pLastNam e{ g et;s e t; }
  [C olumn(Ty peName ="v archar( 10 )")]
  [D ata Type( D ataT ype.Ph oneNumbe r)]
  [MaxLength(1 0 )]
    [Requi r ed ( E rr o rMes sag e = "PhoneNumb e r is  req u ir ed" ) ]
   publ ic st r ing EmpPhoneNumber{get; s et; } 

    [Column (TypeName= " datetime 2(7) " )]     [DataType( DataT ype.Date)]     [Req uired (ErrorMe ssage = " S t art Date  is  re qui red " ) ]    [DisplayF o r mat( Da taForma tSt ring ="{0 :D} ")] 
  public Da teTime E mp St ar tD ate  { ge t ; set; } 
   p ubl ic in t  DeptI d { g et;se t; }
   publ i cD e part me nt  Dep art me nt {get; set ; }
}
Departmen t M o del: 
  public  class Depart me nt
{
    [ Ke y]    pu b l ic int D eptId { get; set; }

  [Requi red (Erro rMes sage = "D epa rtment  Na m e is r equire d")]   [ C o lumn( T y pe Nam e= "varchar ( 5 0)" )]
  [Max Length( 50)]
    public st r ing  DeptName { g et;  set ; }
  p u bli cL ist < E mployee> Employ ees { get;  s e t;  }
}

Empl o yee Vi ewModel :
I wou ld li k e to cr eate just  this one  V iewM o d elfor my CRU D if pos sible.
  publ i cclass  Em ployee Vi ewM odel{
   p ubl ic in t EmpI d{ get;  set;  } 
    pub lic string EmpFirstName 
. They_are listed_below. I would like_to display_all_fields from_my_Employee Model along_with the 2_fields from my Department_Model on the_Index_Method. So, I created the ViewModel with all the fields along with adding a_public_IEnumerable<SelectListItem> DeptList_{_get;_set; } for retrieving data_to a DropDownList on my_Create Method_(which works fine).
Employee Model:
    public_class_Employee
{
  _ [Key]
    public int EmpId {_get; set; }

   _[Column(TypeName = "varchar(50)")]
___ [MaxLength(50)]
  _ [Required(ErrorMessage = "First Name is_Required")]    
 _  public string EmpFirstName { get;_set; }

    [Column(TypeName_= "varchar(50)")]
   _[MaxLength(50)]
 _  [Required(ErrorMessage = "Last_Name is required")]
_ _ public string_EmpLastName { get; set; }

 _  [Column(TypeName_= "varchar(10)")]
    [DataType(DataType.PhoneNumber)]
__  [MaxLength(10)]
___ [Required(ErrorMessage_= "Phone Number_is_required")]
 __ public string EmpPhoneNumber { get;_set;_}

    [Column(TypeName = "datetime2(7)")]
_   [DataType(DataType.Date)]
__  [Required(ErrorMessage =_"Start Date is required")]
 _  [DisplayFormat(DataFormatString = "{0:D}")]
 _ _public DateTime_EmpStartDate { get; set; }

    public int DeptId_{ get; set; }
  _ public Department Department_{ get;_set;_}
}

Department Model:
 __ public_class Department
{
    [Key]
 _ _public int DeptId { get; set;_}

   _[Required(ErrorMessage_= "Department Name is required")]
 _  [Column(TypeName = "varchar(50)")]
 _  [MaxLength(50)]
  __public_string DeptName { get; set;_}

    public List<Employee>_Employees { get;_set; }
}

EmployeeViewModel:
I would like to create just_this_one ViewModel for my CRUD if_possible.
_   public class EmployeeViewModel
{
___ public int EmpId {_get; set; }
   _public string EmpFirstName