app id
This commit is contained in:
@ -11,6 +11,9 @@
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ApplicationID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.DisplayName)
|
||||
</th>
|
||||
@ -28,6 +31,9 @@
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ApplicationID)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DisplayName)
|
||||
</td>
|
||||
|
@ -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");
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user