/// <summary> /// Generate entity type constructor. /// </summary> /// <param name="entityType">Represents an entity type in an <see cref="T:Microsoft.EntityFrameworkCore.Metadata.IModel" />.</param> protected override void GenerateConstructor(IEntityType entityType) { Check.NotNull(entityType, nameof(entityType)); var collectionNavigations = entityType.GetScaffoldNavigations(_options.Value) .Where(n => n.IsCollection).ToList(); if (collectionNavigations.Count > 0) { var lines = new List <Dictionary <string, object> >(); foreach (var navigation in collectionNavigations) { lines.Add(new Dictionary <string, object> { { "property-name", navigation.Name }, { "property-type", navigation.TargetEntityType.Name } }); } var transformedLines = EntityTypeTransformationService.TransformConstructor(entityType.Name, lines); TemplateData.Add("lines", transformedLines); } }