Skip to content

Commit b532c51

Browse files
rate limit api (dotnet#12)
1 parent 5af333f commit b532c51

File tree

91 files changed

+75340
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+75340
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"dotnet-ef": {
6+
"version": "6.0.7",
7+
"commands": [
8+
"dotnet-ef"
9+
]
10+
}
11+
}
12+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@{
2+
Layout = "/Pages/Shared/_Layout.cshtml";
3+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using System.Diagnostics;
3+
using WebRateLimitAuth.Models;
4+
5+
namespace WebRateLimitAuth.Controllers
6+
{
7+
public class Home2Controller : Controller
8+
{
9+
private readonly ILogger<Home2Controller> _logger;
10+
11+
public Home2Controller(ILogger<Home2Controller> logger)
12+
{
13+
_logger = logger;
14+
}
15+
16+
public IActionResult Index()
17+
{
18+
return View();
19+
}
20+
21+
public async Task<IActionResult> Privacy()
22+
{
23+
await Task.Delay(100);
24+
return View();
25+
}
26+
27+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
28+
public IActionResult Error()
29+
{
30+
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
31+
}
32+
}
33+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
2+
using Microsoft.EntityFrameworkCore;
3+
4+
namespace WebRateLimitAuth.Data
5+
{
6+
public class ApplicationDbContext : IdentityDbContext
7+
{
8+
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
9+
: base(options)
10+
{
11+
}
12+
}
13+
}

fundamentals/middleware/rate-limit/WebRateLimitAuth/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs

Lines changed: 277 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)