Atta Kumah

Atta Kumah

  • 1.8k
  • 134
  • 3.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

Brought to you by:

Answers (1)