implement mvc with call notification api from electron

This commit is contained in:
Gregor Biswanger
2017-10-03 04:52:43 +02:00
parent b16e0b0bf9
commit 5bb5bb24de
4 changed files with 29 additions and 10 deletions

View File

@@ -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");
}
}
}