Files
NTBug/web/Helpdesk.Web/Infrastructure/Flash.cs
T

14 lines
540 B
C#
Raw Normal View History

using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace Helpdesk.Web.Infrastructure;
/// <summary>Jednorázové zprávy přes přesměrování (vzor Post/Redirect/Get).</summary>
public static class Flash
{
public const string Success = "Flash.Success";
public const string Error = "Flash.Error";
public static void SetSuccess(this ITempDataDictionary tempData, string message) => tempData[Success] = message;
public static void SetError(this ITempDataDictionary tempData, string message) => tempData[Error] = message;
}