/// <summary> /// Executes DbInit tasks. /// </summary> /// <param name="args">The command line arguments.</param> /// <returns>Error code of the execution.</returns> public static int RunDbInit(this string[] args) { Console.WriteLine(Messages.ExecutingDbInitProgramRun); if (args == null || args.Length == 0) { return(RunDefault()); } return(Parser.Default.ParseArguments(args, typeof(DbGenOptions), typeof(DataSetGenOptions)) .MapResult( (DbGenOptions opts) => DbGenRunner.Execute(opts), (DataSetGenOptions opts) => DataSetGenRunner.Execute(opts), errs => - 1)); }
internal int Run() { return(DbGenRunner.Execute(DbSessionProviderType, DbSessionProviderType.SafeGetDbSessionType(), DbInitializerType, GetProjectPath(), ShowsDbLog)); }