#WARNING THIS PACKAGE IS NO LONGER BEING MAINTANED, AS I DID NOT END UP NEEDING IT
Frozensoft Software Alerts is a package that allows you to easily send alerts to users in your ASP.NET Core project. You can either use bootstrap or make your own classes for the Alerts.
- install the package from nuget: https://www.nuget.org/packages/FrozensoftSoftware.Alerts/
- Setup your Startup.cs file:
Inside of your ConfigureServices add this:
services.AddMvc().AddRazorRuntimeCompilation(); services.Configure<MvcRazorRuntimeCompilationOptions>(options => { options.FileProviders.Add(new EmbeddedFileProvider( typeof(FrozensoftSoftware.Alerts.ViewComponents.Alerts.AlertsViewComponent).Assembly)); }); // Registers the Alert Service services.AddScoped<IAlertService, AlertService>();
- If you have a _ViewImports.cshtml file add this to it:
@addTagHelper *, FrozensoftSoftware.Alerts
- Add the ViewComponent, this can be done where ever you want it, in my instance I have put it inside of the _Layout.cshtml file:
<vc:alerts></vc:alerts>
- Have fun and Enjoy :)
If you have any questions, suggestions or find any bugs feel free to let me know as I would really appreciate it.