mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +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
21 lines
629 B
C#
21 lines
629 B
C#
using System.Text.Json;
|
|
using BTCPayServer.Abstractions.Models;
|
|
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
|
|
|
namespace BTCPayServer.Abstractions.Extensions
|
|
{
|
|
public static class SetStatusMessageModelExtensions
|
|
{
|
|
public static void SetStatusMessageModel(this ITempDataDictionary tempData, StatusMessageModel statusMessage)
|
|
{
|
|
if (statusMessage == null)
|
|
{
|
|
tempData.Remove("StatusMessageModel");
|
|
return;
|
|
}
|
|
|
|
tempData["StatusMessageModel"] = JsonSerializer.Serialize(statusMessage, new JsonSerializerOptions());
|
|
}
|
|
}
|
|
}
|