<#@ include file="EF.Reverse.POCO.Core.ttinclude" #>
<# // v2.32.0 // Please make changes to the settings below. // All you have to do is save this file, and the output file(s) is/are generated. Compiling does not regenerate the file(s). // A course for this generator is available on Pluralsight at https://www.pluralsight.com/courses/code-first-entity-framework-legacy-databases
// Main settings **********************************************************************************************************************
ConnectionStringName = "MyDbContext"; // Searches for this connection string in config files listed below in the ConfigFilenameSearchOrder setting // ConnectionStringName is the only required setting. // As an alternative to ConnectionStringName above, which must match your app/web.config connection string name, you can override them below //ConnectionString = "Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;Application Name=EntityFramework Reverse POCO Generator"; //ProviderName = "System.Data.SqlClient"; // Namespace = ""; // Override the default namespace here
DbContextName = "MyDbContext"; // Note: If generating separate files, please give the db context a different name from this tt filename. //DbContextInterfaceName = "IMyDbContext"; // Defaults to "I" + DbContextName or set string empty to not implement any interface.
DbContextInterfaceBaseClasses = "System.IDisposable"; // Specify what the base classes are for your database context interface
DbContextBaseClass = "System.Data.Entity.DbContext"; // Specify what the base class is for your DbContext. For ASP.NET Identity use "IdentityDbContext<ApplicationUser>" //DefaultConstructorArgument = "EnvironmentConnectionStrings.MyDbContext"; //defaults to "Name=" + ConnectionStringName
ConfigurationClassName = "Configuration"; // Configuration, Mapping, Map, etc. This is appended to the Poco class name to configure the mappings.
ConfigFilenameSearchOrder = new[] { "app.config", "web.config" }; // Add more here if required. The config files are searched for in the local project first, then the whole solution second.
GenerateSeparateFiles = false; MakeClassesInternal = false; MakeClassesPartial = false; MakeDbContextInterfacePartial = false; UseMappingTables = true; // If true, mapping will be used and no mapping tables will be generated. If false, all tables will be generated.
UsePascalCase = true; // This will rename the generated C# tables & properties to use PascalCase. If false table & property names will be left alone.
UseDataAnnotations = false; // If true, will add data annotations to the poco classes.
UseDataAnnotationsSchema = false; // UseDataAnnotations must also be true. If true, will add data annotations schema to the poco classes.
UsePropertyInitializers