This commit is contained in:
Paul Schneider 2016-05-20 12:53:53 +02:00
commit 075095bdbe
3 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,4 @@
using System;
using System.Linq;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc;
@ -51,6 +52,7 @@ namespace Yavsc.Controllers
{
if (ModelState.IsValid)
{
application.ApplicationID = Guid.NewGuid().ToString();
_context.Applications.Add(application);
_context.SaveChanges();
return RedirectToAction("Index");

View file

@ -1,12 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc
{
public class Application
{
[Key]
public string ApplicationID { get; set; }
public string DisplayName { get; set; }
public string RedirectUri { get; set; }
public string LogoutRedirectUri { get; set; }
public string Secret { get; set; }
}
}
}