GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 解决rtm postgrepsql的问题 · ISmallCode/SmallCode.Web@1a3acaa

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • SmallCode.Web.sln
  • src
    • SmallCode.Web
      • Models
        • SCContext.cs
      • project.json
      • wwwroot/scripts
        • smallcode.js
    • WebApplication1
      • .bowerrc
      • Controllers
        • HomeController.cs
      • Program.cs
      • Project_Readme.html
      • Properties
        • launchSettings.json
      • Startup.cs
      • Views
        • Home
          • About.cshtml
          • Contact.cshtml
          • Index.cshtml
        • Shared
          • Error.cshtml
          • _Layout.cshtml
        • _ViewImports.cshtml
        • _ViewStart.cshtml
      • WebApplication1.xproj
      • appsettings.json
      • bower.json
      • bundleconfig.json
      • project.json
      • web.config
      • wwwroot
        • _references.js
        • css
          • site.css
          • site.min.css
        • favicon.ico
        • images
          • banner1.svg
          • banner2.svg
          • banner3.svg
          • banner4.svg
        • js
          • site.js
          • site.min.js
        • lib
          • bootstrap
            • .bower.json
            • LICENSE
            • dist
              • css
                • bootstrap-theme.css.map
                • bootstrap-theme.css
                • bootstrap-theme.min.css.map
                • bootstrap-theme.min.css
                • bootstrap.css.map
                • bootstrap.css
                • bootstrap.min.css.map
                • bootstrap.min.css
              • fonts
                • glyphicons-halflings-regular.eot
                • glyphicons-halflings-regular.svg
                • glyphicons-halflings-regular.ttf
                • glyphicons-halflings-regular.woff2
                • glyphicons-halflings-regular.woff
              • js
                • bootstrap.js
                • bootstrap.min.js
                • npm.js
          • jquery-validation-unobtrusive
            • .bower.json
            • jquery.validate.unobtrusive.js
            • jquery.validate.unobtrusive.min.js
          • jquery-validation
            • .bower.json
            • LICENSE.md
            • dist
              • additional-methods.js
              • additional-methods.min.js
              • jquery.validate.js
              • jquery.validate.min.js
          • jquery
            • .bower.json
            • LICENSE.txt
            • dist
              • jquery.js
              • jquery.min.js
              • jquery.min.map

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎SmallCode.Web.sln‎

Copy file name to clipboardExpand all lines: SmallCode.Web.sln
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{20B66DE1-2938-4B60-9261-C1E2D71AF286}"
77
EndProject
@@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
EndProject
1414
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SmallCode.Web", "src\SmallCode.Web\SmallCode.Web.xproj", "{A348E72F-EE15-4159-96ED-C2C56721DAAB}"
1515
EndProject
16+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApplication1", "src\WebApplication1\WebApplication1.xproj", "{6ABB8318-DE83-4D7E-ACD4-F3EDBE4BC0BD}"
17+
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1820
Debug|Any CPU = Debug|Any CPU
@@ -23,11 +25,16 @@ Global
2325
{A348E72F-EE15-4159-96ED-C2C56721DAAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
2426
{A348E72F-EE15-4159-96ED-C2C56721DAAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
2527
{A348E72F-EE15-4159-96ED-C2C56721DAAB}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{6ABB8318-DE83-4D7E-ACD4-F3EDBE4BC0BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29+
{6ABB8318-DE83-4D7E-ACD4-F3EDBE4BC0BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{6ABB8318-DE83-4D7E-ACD4-F3EDBE4BC0BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{6ABB8318-DE83-4D7E-ACD4-F3EDBE4BC0BD}.Release|Any CPU.Build.0 = Release|Any CPU
2632
EndGlobalSection
2733
GlobalSection(SolutionProperties) = preSolution
2834
HideSolutionNode = FALSE
2935
EndGlobalSection
3036
GlobalSection(NestedProjects) = preSolution
3137
{A348E72F-EE15-4159-96ED-C2C56721DAAB} = {20B66DE1-2938-4B60-9261-C1E2D71AF286}
38+
{6ABB8318-DE83-4D7E-ACD4-F3EDBE4BC0BD} = {20B66DE1-2938-4B60-9261-C1E2D71AF286}
3239
EndGlobalSection
3340
EndGlobal
Collapse file

‎src/SmallCode.Web/Models/SCContext.cs‎

Copy file name to clipboardExpand all lines: src/SmallCode.Web/Models/SCContext.cs
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using System.Collections.Generic;
44
using System.Linq;
55
using System.Threading.Tasks;
6+
using Npgsql.EntityFrameworkCore;
7+
using Npgsql.EntityFrameworkCore.PostgreSQL;
68

79
namespace SmallCode.Web.Models
810
{
@@ -54,6 +56,7 @@ public SCContext(DbContextOptions option) : base(option)
5456

5557
protected override void OnModelCreating(ModelBuilder builder)
5658
{
59+
builder.HasPostgresExtension("uuid-ossp");
5760
base.OnModelCreating(builder);
5861
}
5962

Collapse file

‎src/SmallCode.Web/project.json‎

Copy file name to clipboard
+34-33Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,45 @@
11
{
22
"dependencies": {
3-
"Microsoft.NETCore.App": {
4-
"version": "1.0.0-rc2-3002702",
5-
"type": "platform"
6-
},
7-
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
3+
"CommonMark.NET": "0.12.0",
4+
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
5+
"Microsoft.AspNetCore.Authentication": "1.0.0",
6+
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
7+
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
8+
"Microsoft.AspNetCore.Mvc": "1.0.0",
89
"Microsoft.AspNetCore.Razor.Tools": {
9-
"version": "1.0.0-preview1-final",
10+
"version": "1.0.0-preview2-final",
1011
"type": "build"
1112
},
12-
"Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
13-
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-rc2-final",
14-
"Npgsql.EntityFrameworkCore.PostgreSQL": "1.0.0-rc2-release1",
15-
"Microsoft.EntityFrameworkCore.Tools": {
16-
"version": "1.0.0-preview1-final",
17-
"type": "build"
13+
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
14+
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
15+
"Microsoft.AspNetCore.Session": "1.0.0",
16+
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
17+
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
18+
"Microsoft.Extensions.Configuration.Json": "1.0.0",
19+
"Microsoft.Extensions.Logging": "1.0.0",
20+
"Microsoft.Extensions.Logging.Console": "1.0.0",
21+
"Microsoft.Extensions.Logging.Debug": "1.0.0",
22+
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
23+
"Microsoft.NETCore.App": {
24+
"version": "1.0.0",
25+
"type": "platform"
1826
},
19-
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
20-
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
21-
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
22-
"Microsoft.AspNetCore.Authentication": "1.0.0-rc2-final",
23-
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-final",
24-
"Microsoft.AspNetCore.Session": "1.0.0-rc2-final",
25-
"Microsoft.Extensions.DependencyInjection": "1.0.0-rc2-final",
26-
"Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final",
27-
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
28-
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
29-
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
30-
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
31-
"SmallCode.Pager.RC2": "1.0.0-rc2-1",
32-
"CommonMark.NET": "0.12.0",
33-
"Microsoft.AspNetCore.SignalR.Server": "0.1.0-rc2-20896"
27+
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
28+
"Npgsql.EntityFrameworkCore.PostgreSQL": "1.0.0",
29+
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
30+
"SmallCode.Pager": "1.0.0"
3431
},
3532

3633
"tools": {
37-
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
38-
"version": "1.0.0-preview1-final",
39-
"imports": "portable-net45+win8+dnxcore50"
40-
}
34+
"BundlerMinifier.Core": "2.0.238",
35+
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
36+
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
4137
},
4238

4339
"frameworks": {
4440
"netcoreapp1.0": {
4541
"imports": [
4642
"dotnet5.6",
47-
"dnxcore50",
4843
"portable-net45+win8"
4944
]
5045
}
@@ -56,17 +51,23 @@
5651
},
5752

5853
"runtimeOptions": {
59-
"gcServer": true
54+
"configProperties": {
55+
"System.GC.Server": true
56+
}
6057
},
6158

6259
"publishOptions": {
6360
"include": [
6461
"wwwroot",
62+
"Views",
63+
"Areas/**/Views",
64+
"appsettings.json",
6565
"web.config"
6666
]
6767
},
6868

6969
"scripts": {
70+
"prepublish": [ "bower install", "dotnet bundle" ],
7071
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
7172
}
7273
}
Collapse file

‎src/SmallCode.Web/wwwroot/scripts/smallcode.js‎

Copy file name to clipboardExpand all lines: src/SmallCode.Web/wwwroot/scripts/smallcode.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
// Use Ajax to submit form data
5555
$.post("/Account/Login", $form.serialize(), function (data) {
5656
console.log(data)
57-
console.log(typeof (data.Status));
58-
if (data.Status == "ok") {
57+
console.log(data.status);
58+
if (data.status == "ok") {
5959
window.location.href = "/Home/Index";
6060
}
61-
else if (data.Status == "error") {
61+
else if (data.status == "error") {
6262
// $("#warning").html(data.Message);
63-
alert(data.Message);
63+
alert(data.message);
6464
}
6565
else {
6666
// $("#warning").html("未知错误!");
Collapse file

‎src/WebApplication1/.bowerrc‎

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "wwwroot/lib"
3+
}
Collapse file

‎src/WebApplication1/Controllers/HomeController.cs‎

Copy file name to clipboard
+35Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace WebApplication1.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public IActionResult Index()
12+
{
13+
return View();
14+
}
15+
16+
public IActionResult About()
17+
{
18+
ViewData["Message"] = "Your application description page.";
19+
20+
return View();
21+
}
22+
23+
public IActionResult Contact()
24+
{
25+
ViewData["Message"] = "Your contact page.";
26+
27+
return View();
28+
}
29+
30+
public IActionResult Error()
31+
{
32+
return View();
33+
}
34+
}
35+
}
Collapse file

‎src/WebApplication1/Program.cs‎

Copy file name to clipboard
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Hosting;
7+
8+
namespace WebApplication1
9+
{
10+
public class Program
11+
{
12+
public static void Main(string[] args)
13+
{
14+
var host = new WebHostBuilder()
15+
.UseKestrel()
16+
.UseContentRoot(Directory.GetCurrentDirectory())
17+
.UseIISIntegration()
18+
.UseStartup<Startup>()
19+
.Build();
20+
21+
host.Run();
22+
}
23+
}
24+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.