I have a list of Customers, and each customer can have multiple orders, however I need to delete some of the orders from customers. If I loop through the list, I can find the Orders that I need to delete, but how do I actually delete them?
List<Customers>
public class Customers
{
public int CustomerId { get; set; }
public string NameFirst { get; set; }
public Order[] Orders { get; set; }
}
public class Orders
{
public string OrderMode { get; set; }
public int Id { get; set; }
}
Customer. A class represents a single object and should have a singular noun. Except for a collection-class (Customerswould be a class representing a collection of customers). Same goes for yourOrder-class.