mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
179520a211
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
36 lines
884 B
C#
36 lines
884 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using BTCPayServer.Plugins.Test.Data;
|
|
using BTCPayServer.Plugins.Test.Services;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Plugins.Test
|
|
{
|
|
[Route("extensions/test")]
|
|
public class TestExtensionController : Controller
|
|
{
|
|
private readonly TestPluginService _testPluginService;
|
|
|
|
public TestExtensionController(TestPluginService testPluginService)
|
|
{
|
|
_testPluginService = testPluginService;
|
|
}
|
|
|
|
// GET
|
|
public async Task<IActionResult> Index()
|
|
{
|
|
return View(new TestPluginPageViewModel()
|
|
{
|
|
Data = await _testPluginService.Get()
|
|
});
|
|
}
|
|
|
|
|
|
}
|
|
|
|
public class TestPluginPageViewModel
|
|
{
|
|
public List<TestPluginData> Data { get; set; }
|
|
}
|
|
}
|