Atta Kumah

Atta Kumah

  • NA
  • 167
  • 12.2k

Create a List of Users(MVC Web Application)

Sep 27 2019 12:57 AM
public class Customer
{
public Customer()
{
Number = Users?.Count ?? 0;
}
public int CustomerID { get; set; }
public string Name { get; set; }
public string Age { get; set; }
public string Status { get; set; }
public DateTime CreatedDateTime { get; set; }
public int Number { get; set; }
public List Users { get; set; }
}
public class User
{
public int UserID { get; set; }
public int CustomerID { get; set; }
public string Name { get; set; }
}
 
I want to Design MVC application For My user.
 
How can i make a list to add two or more users in one row
 
Below is example
 
ID Time Name Age Number Status
2 8:30pm John 23 3 Done (Have 3 users in one rown)
2 8:35pm Seidu 30 2 Done (Have 2 users in one row)
2 8:40pm Goda 30 5 Done (Have 5 users in one row)
 
But With the Above classes, What are the code to add to existing list and the view action
Please any humble contribution is happily welcome
Counting on your Kindly Consideration

Answers (1)