mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-04-26 08:00:58 +00:00
implement mvc with call notification api from electron
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ElectronNET.API;
|
||||
using ElectronNET.API.Entities;
|
||||
|
||||
namespace ElectronNET.WebApp.Controllers
|
||||
{
|
||||
@@ -12,5 +14,15 @@ namespace ElectronNET.WebApp.Controllers
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult SayHello()
|
||||
{
|
||||
App.CreateNotification(new NotificationOptions {
|
||||
Title = "Hallo Robert",
|
||||
Body = "Nachricht von ASP.NET Core App"
|
||||
});
|
||||
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user