parent
303c7ce898
commit
9efc3b8059
@ -0,0 +1,28 @@ |
||||
using HelloEmpty_ToRazor.Models; |
||||
using Microsoft.AspNetCore.Mvc; |
||||
using Microsoft.AspNetCore.Mvc.RazorPages; |
||||
|
||||
namespace HelloEmpty_ToRazor.Pages |
||||
{ |
||||
public class IndexModel : PageModel |
||||
{ |
||||
// ¸ðµ¨ ¹ÙÀεù Âü°¡ ¾Ï½Ã |
||||
[BindProperty] |
||||
public HelloMessage HelloMsg { get; set; } |
||||
|
||||
public string Noti { get; set; } |
||||
|
||||
public void OnGet() |
||||
{ |
||||
this.HelloMsg = new HelloMessage() |
||||
{ |
||||
Message = "Hello Razor Pages" |
||||
}; |
||||
} |
||||
|
||||
public void OnPost() |
||||
{ |
||||
this.Noti = "Message Changed!"; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,18 @@ |
||||
namespace HelloEmpty_ToRazor |
||||
{ |
||||
public class Program |
||||
{ |
||||
public static void Main(string[] args) |
||||
{ |
||||
var builder = WebApplication.CreateBuilder(args); |
||||
|
||||
builder.Services.AddRazorPages(); |
||||
|
||||
var app = builder.Build(); |
||||
|
||||
app.MapRazorPages(); |
||||
|
||||
app.Run(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,8 @@ |
||||
{ |
||||
"Logging": { |
||||
"LogLevel": { |
||||
"Default": "Information", |
||||
"Microsoft.AspNetCore": "Warning" |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ |
||||
"Logging": { |
||||
"LogLevel": { |
||||
"Default": "Information", |
||||
"Microsoft.AspNetCore": "Warning" |
||||
} |
||||
}, |
||||
"AllowedHosts": "*" |
||||
} |
Loading…
Reference in new issue