views:

41

answers:

0

If i have for example this two classes, where I have a One To Many Relationship and i want to perform a Visual Studio Data-Driven Unit test, how can I get the data from multiple sources using visual studio or how can i flatten the orders data in a column? What i mean is that if i can´t access multiple sources from a data-driven test, i want to flatten all the Orders referred to a Person in a single column and add that colum to the Persons table in order to be able to get the person an its orders at the same time.

    public class Person
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public IList<Order> Orders { get; set; }
    }

    public class Order
    {
        public Person Buyer { get; set; }
        public int Id { get; set; }
        // Other Properties
    }