|
|
|
@ -279,15 +279,23 @@ public abstract class ProjectCreationCommandBase |
|
|
|
protected virtual DatabaseProvider GetDatabaseProvider(CommandLineArgs commandLineArgs) |
|
|
|
{ |
|
|
|
var optionValue = commandLineArgs.Options.GetOrNull(Options.DatabaseProvider.Short, Options.DatabaseProvider.Long); |
|
|
|
switch (optionValue) |
|
|
|
|
|
|
|
if (optionValue == null) |
|
|
|
{ |
|
|
|
case "ef": |
|
|
|
return DatabaseProvider.EntityFrameworkCore; |
|
|
|
case "mongodb": |
|
|
|
return DatabaseProvider.MongoDb; |
|
|
|
default: |
|
|
|
return DatabaseProvider.NotSpecified; |
|
|
|
return DatabaseProvider.NotSpecified; |
|
|
|
} |
|
|
|
|
|
|
|
if (optionValue.Equals("ef", StringComparison.InvariantCultureIgnoreCase) || optionValue.Equals("entityframeworkcore", StringComparison.InvariantCultureIgnoreCase)) |
|
|
|
{ |
|
|
|
return DatabaseProvider.EntityFrameworkCore; |
|
|
|
} |
|
|
|
|
|
|
|
if (optionValue.Equals("mongo", StringComparison.InvariantCultureIgnoreCase) || optionValue.Equals("mongodb", StringComparison.InvariantCultureIgnoreCase)) |
|
|
|
{ |
|
|
|
return DatabaseProvider.MongoDb; |
|
|
|
} |
|
|
|
|
|
|
|
throw new CliUsageException("The option you provided for Database Provider is invalid!"); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual void RunGraphBuildForMicroserviceServiceTemplate(ProjectBuildArgs projectArgs) |
|
|
|
@ -322,7 +330,7 @@ public abstract class ProjectCreationCommandBase |
|
|
|
case "oracle": |
|
|
|
return DatabaseManagementSystem.Oracle; |
|
|
|
default: |
|
|
|
return DatabaseManagementSystem.NotSpecified; |
|
|
|
throw new CliUsageException("The option you provided for Database Management System is invalid!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -332,12 +340,13 @@ public abstract class ProjectCreationCommandBase |
|
|
|
|
|
|
|
switch (optionValue) |
|
|
|
{ |
|
|
|
case null: |
|
|
|
case "none": |
|
|
|
return MobileApp.None; |
|
|
|
case "react-native": |
|
|
|
return MobileApp.ReactNative; |
|
|
|
default: |
|
|
|
return MobileApp.None; |
|
|
|
throw new CliUsageException("The option you provided for Mobile App is invalid!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -349,8 +358,11 @@ public abstract class ProjectCreationCommandBase |
|
|
|
} |
|
|
|
|
|
|
|
var optionValue = commandLineArgs.Options.GetOrNull(Options.UiFramework.Short, Options.UiFramework.Long); |
|
|
|
|
|
|
|
switch (optionValue) |
|
|
|
{ |
|
|
|
case null: |
|
|
|
return UiFramework.NotSpecified; |
|
|
|
case "none": |
|
|
|
return UiFramework.None; |
|
|
|
case "mvc": |
|
|
|
@ -362,7 +374,7 @@ public abstract class ProjectCreationCommandBase |
|
|
|
case "blazor-server": |
|
|
|
return UiFramework.BlazorServer; |
|
|
|
default: |
|
|
|
return UiFramework.NotSpecified; |
|
|
|
throw new CliUsageException("The option you provided for UI Framework is invalid!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|