Based on your description, it seems that you want to save a 1 to many relationship entities into database. like below:
using (var context = new YourDbContext())
{
var car= new Car
{
Name = "My Dream Car",
Images= new List<Image>
{
new Image{ CarColor = "Blue" },
new Image{ CarColor = "Yellow" },
new Image{ CarColor = "Red" }
}
};
context.Cars.Add(car);
context.SaveChanges();
}
Best regards,
Zhanglong