Priyansh Bhaliya

Priyansh Bhaliya

  • NA
  • 376
  • 4.4k

confusion in ViewModel and model in Asp.net MVC

Jun 13 2017 1:35 AM
public class Attendance
{
[Key]
[Column(Order = 1)]
public int GigId { get; set; }
 
[Key]
[Column(Order = 2)]
public string AttendeeId { get; set; }
 
 
public Gigs gig { get; set; }
public ApplicationUser Attendee { get; set; }
 
}
in above Model: we need GigId and AttendeeId .
we are defined in list
but why create object of same class:
public Gigs gig { get; set; }
public ApplicationUser Attendee { get; set; }
 
this is ViewModel or Model ???
 

Answers (4)