In my MVC3 application I want to create an anonymous collection with fields names like this:
new
{
Buyer.Firstname = "Jim",
Buyer.Lastname = "Carrey",
Phone = "403-222-6487",
PhoneExtension = "",
SmsNumber = "",
Buyer.Company = "Company 10025",
Buyer.ZipCode = "90210",
Buyer.City = "Beverly Hills",
Buyer.State = "CA",
Buyer.Address1 = "Address 10025"
Licenses[0].IsDeleted = "False",
Licenses[0].ID = "6",
Licenses[0].AdmissionDate = "2,1999",
Licenses[0].AdmissionDate_monthSelected = "2",
}
I want to have this in order to send custom post requests during integration testing of my app. How can I declare a an anonymous collection with this field names?
Use an anonymous collection of anonymous objects, like so:
… and in context: ([edit] Oh, and I didn’t see your buyer…)