Fitment update

This commit is contained in:
2023-01-29 11:48:13 -05:00
parent b259b77967
commit ff20615481
22 changed files with 777 additions and 1004 deletions

View File

@@ -1,17 +1,18 @@
#pragma warning disable CA2100 // Review SQL queries for security vulnerabilities
using System;
using System.Collections.Generic;
using System.Data;
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using PartSource.Automation.Models.Configuration;
using PartSource.Automation.Models.Enums;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
namespace PartSource.Automation.Services
{
public class WhiSeoService
public class WhiSeoService
{
private readonly FtpService _ftpService;
private readonly string _connectionString;
@@ -52,12 +53,12 @@ namespace PartSource.Automation.Services
}
}
public void TruncateVehicleTables()
public void TruncateVehicleTable()
{
using SqlConnection connection = new SqlConnection(_connectionString);
connection.Open();
using SqlCommand command = new SqlCommand($"exec DropVehicleTables", connection);
using SqlCommand command = new SqlCommand($"truncate table dbo.Vehicle", connection);
command.ExecuteNonQuery();
}
@@ -150,6 +151,10 @@ namespace PartSource.Automation.Services
using SqlCommand command = new SqlCommand($"exec CreateFitmentView", connection);
command.CommandTimeout = 1800;
command.ExecuteNonQuery();
using SqlCommand command2 = new SqlCommand($"exec CreateFitmentIndexes", connection);
command.CommandTimeout = 1800;
command2.ExecuteNonQuery();
}
public void CreateVehicleTable()