private static void ScaffoldMappingDependencies(EntityFrameworkCoreProject project) { if (!project.Settings.UseDataAnnotations) { CSharpCodeBuilder .CreateFiles(project.OutputDirectory, project.GetDataLayerConfigurationsDirectory(), project.Settings.ForceOverwrite, project.GetEntityMapperInterfaceDefinition(), project.GetEntityTypeConfigurationInterfaceDefinition()); CSharpCodeBuilder .CreateFiles(project.OutputDirectory, project.GetDataLayerConfigurationsDirectory(), project.Settings.ForceOverwrite, project.GetEntityMapperClassDefinition(), project.GetDatabaseEntityMapperClassDefinition()); } }
private static void ScaffoldMappings(EntityFrameworkCoreProject project) { if (!project.Settings.UseDataAnnotations) { foreach (var table in project.Database.Tables) { CSharpCodeBuilder .CreateFiles(project.OutputDirectory, project.GetDataLayerConfigurationsDirectory(), project.Settings.ForceOverwrite, project.GetEntityTypeConfigurationClassDefinition(table)); } foreach (var view in project.Database.Views) { CSharpCodeBuilder .CreateFiles(project.OutputDirectory, project.GetDataLayerConfigurationsDirectory(), project.Settings.ForceOverwrite, project.GetEntityTypeConfigurationClassDefinition(view)); } } }