Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using System.Data.SqlClient;
using System;
var app = WebApplication.Create();
app.MapGet("/token", () => new Random().Next().ToString());
app.MapGet("/user", (string id) => {
var conn = new SqlConnection("...");
var cmd = new SqlCommand("SELECT * FROM Users WHERE Id = '" + id + "'", conn);
return "ok";
});
app.Run();