Skip to content

Commit 13aeb9b

Browse files
committed
Spring cleaning
Updated packages, and moved entities to separate folder
1 parent 8312d79 commit 13aeb9b

File tree

10 files changed

+17
-13
lines changed

10 files changed

+17
-13
lines changed

SqlExcelExporter/DatabaseHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Data;
4-
using Microsoft.Data.SqlClient;
54
using System.Diagnostics;
65
using System.IO;
76
using System.Net.Sockets;
87
using System.Text;
8+
using Microsoft.Data.SqlClient;
9+
using SqlExcelExporter.Entities;
910

1011
namespace SqlExcelExporter
1112
{

SqlExcelExporter/ConfigurationEntity.cs renamed to SqlExcelExporter/Entities/ConfigurationEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SqlExcelExporter
1+
namespace SqlExcelExporter.Entities
22
{
33
/// <summary>
44
/// Container for configuration settings from the config.json file

SqlExcelExporter/ConnectionEntity.cs renamed to SqlExcelExporter/Entities/ConnectionEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SqlExcelExporter
1+
namespace SqlExcelExporter.Entities
22
{
33
/// <summary>
44
/// Container for connection settings from the connection.json file
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Data;
33

4-
namespace SqlExcelExporter
4+
namespace SqlExcelExporter.Entities
55
{
66
/// <summary>
77
/// Container for results from one or more queries against SQL Server

SqlExcelExporter/FileWriter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using System.IO;
3+
using SqlExcelExporter.Entities;
34

45
namespace SqlExcelExporter
56
{

SqlExcelExporter/SqlExcelExporter.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<ReleaseVersion>0.2</ReleaseVersion>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.1" />
9-
<PackageReference Include="ClosedXML" Version="0.95.0-beta2" />
8+
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.0" />
9+
<PackageReference Include="ClosedXML" Version="0.95.3" />
10+
</ItemGroup>
11+
<ItemGroup>
12+
<Folder Include="Entities\" />
1013
</ItemGroup>
1114
</Project>

SqlExcelExporter/Tools.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static T ReadJsonItem<T>(FileInfo file)
1616
{
1717
if (!File.Exists(file.FullName))
1818
{
19-
return default(T);
19+
return default;
2020
}
2121

2222
return JsonSerializer.Deserialize<T>(File.ReadAllText(file.FullName));
@@ -26,9 +26,6 @@ public static T ReadJsonItem<T>(FileInfo file)
2626
/// Checks if assembly is running on Windows
2727
/// </summary>
2828
/// <returns>True or false</returns>
29-
public static bool IsWindows()
30-
{
31-
return Path.DirectorySeparatorChar.Equals('\\');
32-
}
29+
public static bool IsWindows() => Path.DirectorySeparatorChar.Equals('\\');
3330
}
3431
}

SqlExcelExporter/WorkbookManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Linq;
55
using System.Text;
66
using ClosedXML.Excel;
7+
using SqlExcelExporter.Entities;
78

89
namespace SqlExcelExporter
910
{

sql2xls/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using SqlExcelExporter;
5+
using SqlExcelExporter.Entities;
56

67
namespace SqlToExcelExporter
78
{
@@ -12,7 +13,7 @@ class Program
1213

1314
private static void Main()
1415
{
15-
Console.WriteLine("--- SQL to Excel Exporter v0.2.0");
16+
Console.WriteLine("--- SQL to Excel Exporter v0.2.1");
1617
Console.WriteLine("--- Copyright (c) Born SQL");
1718
Console.WriteLine("--- Written by Randolph West and other contributors. https://bornsql.ca/.");
1819
Console.WriteLine();

sql2xls/scripts/sp_Blitz.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exec sp_Blitz
1+
exec sp_Blitz;

0 commit comments

Comments
 (0)