Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DbQuery/CommandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ protected static void Wait()
{
Console.WriteLine();
Console.Write("Press any key...");
Console.ReadKey(true);
// Console.ReadKey(true);
}
}
6 changes: 4 additions & 2 deletions DbQuery/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private async Task ExecuteAsync(string[] args)
// help
if (command == null)
{
ShowHelp();
// ShowHelp();
return;
}

Expand Down Expand Up @@ -195,15 +195,17 @@ private static void ShowHelp()
TestSqlConnectionCommand.ShowHelp();
TestVersionCommand.ShowHelp();
TestEmptyTableCommand.ShowHelp();
Wait();
// Wait();
}

/*
private static void Wait()
{
Console.WriteLine();
Console.Write("Press any key...");
Console.ReadKey(true);
}
*/

static async Task Main(string[] args) =>
await new Program().ExecuteAsync(args);
Expand Down
6 changes: 3 additions & 3 deletions DbQuery/TestServerCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ internal static void ShowHelp()
Console.WriteLine(" Output:");
Console.WriteLine(" Exit code -1: database server not available");
Console.WriteLine(" Exit code -2: invalid database connection string");
Console.WriteLine(" Examples:");
Console.WriteLine(" TestServer 'server=localhost;database=MyDatabase; Integrated Security=SSPI;TrustServerCertificate=True;' 2");
Wait();
Console.WriteLine("Examples:");
Console.WriteLine(" TestServer 'server=localhost;database=MyDatabase; Integrated Security=SSPI;TrustServerCertificate=True;' 2");
//Wait(); // disabled for docker compatibility
}
}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Version>1.0.16</Version>
<FileVersion>1.0.16</FileVersion>
<InformationalVersion>1.0.16</InformationalVersion>
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0
WORKDIR /src

# copy solution and project files
COPY ["PayrollEngine.SqlServer.DbQuery.sln", "./"]
COPY ["DbQuery/PayrollEngine.SqlServer.DbQuery.csproj", "DbQuery/"]

# copy Directory.Build.props
COPY ["Directory.Build.props", "./"]

RUN dotnet restore "PayrollEngine.SqlServer.DbQuery.sln"

# copy everything else
COPY . .
WORKDIR "/src/DbQuery"
RUN dotnet publish "PayrollEngine.SqlServer.DbQuery.csproj" -c Release -o /app/publish --no-restore

# final stage
FROM mcr.microsoft.com/dotnet/runtime:9.0
WORKDIR /app
COPY --from=0 /app/publish .
ENTRYPOINT ["dotnet", "PayrollEngine.SqlServer.DbQuery.dll"]