Skip to content

Instantly share code, notes, and snippets.

@tonnguyen
Created January 30, 2020 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonnguyen/2161a36c62d9d8f151ccf1e6ddbd5537 to your computer and use it in GitHub Desktop.
Save tonnguyen/2161a36c62d9d8f151ccf1e6ddbd5537 to your computer and use it in GitHub Desktop.
Generate variants
for (int i = 0; i < 200; i++)
{
var variant = new AddVariantToBaseProductModel()
{
Id = "RandomVariant" + i,
SystemId = Guid.NewGuid(),
BaseProductSystemId = baseProduct.SystemId,
Name = "RandomVariant" + i,
}.MapTo<Variant>();
_variantService.Create(variant);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment