Skip to content

Commit

Permalink
Cleanup usings
Browse files Browse the repository at this point in the history
  • Loading branch information
RobKraft committed Dec 14, 2024
1 parent 6d0e45f commit 81b549c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
25 changes: 0 additions & 25 deletions Lambdas/ReusefullCommonLibrary/ReusefullCommonLibrary.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
using Amazon;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using Amazon.Lambda.RuntimeSupport;
using Amazon.Lambda.Serialization.SystemTextJson;
using Amazon.RDS.Util;
using MySqlConnector;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace ReusefullCommonLibrary
{
Expand All @@ -18,24 +11,6 @@ public static class DatabaseHelper
static RegionEndpoint _dbRegion = RegionEndpoint.GetBySystemName(Environment.GetEnvironmentVariable("DB_REGION") ?? "us-east-2");
static string _dbUser = "reusefullrds";

public static async Task<MySqlDataReader> GetData(string sql)
{
string connectionString = GetConnectionString();

using (MySqlConnection connection = new MySqlConnection(connectionString))
{
await connection.OpenAsync();
using (MySqlCommand command = new MySqlCommand(sql, connection))
{
using (MySqlDataReader reader = (MySqlDataReader)await command.ExecuteReaderAsync())
{
return reader;
}
}
}
return null;
}

public static string GetConnectionString()
{
string connectionString = string.Empty;
Expand Down
5 changes: 0 additions & 5 deletions Lambdas/ReusefullCommonLibrary/ReusefullCommonLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="2.7.1" />
<PackageReference Include="Amazon.Lambda.Core" Version="2.5.0" />
<PackageReference Include="Amazon.Lambda.RuntimeSupport" Version="1.12.2" />
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.4" />
<PackageReference Include="AWSSDK.RDS" Version="3.7.409.6" />
<PackageReference Include="MySqlConnector" Version="2.4.0" />
</ItemGroup>

</Project>

0 comments on commit 81b549c

Please sign in to comment.