Removed PdfViewController, HtmlViewRenderer and FakeView to be replaced with ViewEngineResult Render method
Added HttpException class for missing HttpException for net8 Wrapped HttpContext.Session, GetJsonResult, IsAjaxRequest and GetUserIdentityName in controllers for net8 Added AuthenticationService to test Fab2ApprovalMKLink code for net8 Compile conditionally flags to debug in dotnet core
This commit is contained in:
22
Fab2ApprovalMKLink/Services/DbConnectionService.cs
Normal file
22
Fab2ApprovalMKLink/Services/DbConnectionService.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System.Data;
|
||||
|
||||
using Fab2ApprovalSystem.Models;
|
||||
|
||||
using Microsoft.Data.SqlClient;
|
||||
|
||||
namespace Fab2ApprovalSystem.Services;
|
||||
|
||||
public interface IDbConnectionService {
|
||||
IDbConnection GetConnection();
|
||||
}
|
||||
|
||||
public class DbConnectionService : IDbConnectionService {
|
||||
private readonly string _dbConnectionString;
|
||||
|
||||
public DbConnectionService(AppSettings appSettings) {
|
||||
_dbConnectionString = appSettings.DBConnectionString;
|
||||
}
|
||||
|
||||
public IDbConnection GetConnection() =>
|
||||
new SqlConnection(_dbConnectionString);
|
||||
}
|
Reference in New Issue
Block a user