I have two class :
public class Customer
{
public string FirstName { get; set; }
public string LastName { get; set; }
public DateTime Date { get; set; }
public bool isActif { get; set; }
public Quantity Quantity { get; set; }
}
public class Quantity
{
public string Color { get; set; }
public int Number { get; set; }
}
And one instance for example :
Customer[] c = new Customer[]
{
new Customer()
{
FirstName = "FirstName1",
LastName = "LastName1",
Date = DateTime.Now.Date,
isActif = true,
Quantity = new Quantity()
{
Number = 12,
Color = "Blue"
}
},
new Customer()
{
FirstName = "FirstName2",
LastName = "LastName2",
Date = DateTime.Now.Date.AddDays(2),
isActif = false,
Quantity = new Quantity()
{
Number = 13,
Color = "Green"
}
}
};
I want to create a filter since a configuration file. For example I want to specify in a configuration file that i want to take only the customers with the property isActif = true. Or only the customer with Quantity.Color = "Green"
I think I'll do this with a LINQ Dynamic Query Library Link
I want advice about my configuration file structure and how to structure it in my code
Thank's
