Slide 36
Slide 36 text
builder.Services.AddDbContext(optionsBuilder =>
{
optionsBuilder.UseSqlite("Data Source=app.db");
});
// ..
app.RegisterExpenseEndpoints();
app.UseExceptionHandler();
app.Use(async (context, next) =>
{
var logger = app.Logger;
var displayUrl = context.Request.GetDisplayUrl();
logger.LogDebug("Before Request with Uri '{Uri}'", displayUrl);
await next(context);
logger.LogDebug("After Request with Uri '{Uri}'", displayUrl);
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
builder.Services.AddDbContext(optionsBuilder =>
{
optionsBuilder.UseSqlite("Data Source=app.db");
1
2
3
});
4
5
// ..
6
7
app.RegisterExpenseEndpoints();
8
9
10
app.UseExceptionHandler();
11
12
app.Use(async (context, next) =>
13
{
14
var logger = app.Logger;
15
var displayUrl = context.Request.GetDisplayUrl();
16
logger.LogDebug("Before Request with Uri '{Uri}'", displayUrl);
17
await next(context);
18
logger.LogDebug("After Request with Uri '{Uri}'", displayUrl);
19
});
20
app.UseExceptionHandler();
builder.Services.AddDbContext(optionsBuilder =>
1
{
2
optionsBuilder.UseSqlite("Data Source=app.db");
3
});
4
5
// ..
6
7
app.RegisterExpenseEndpoints();
8
9
10
11
12
app.Use(async (context, next) =>
13
{
14
var logger = app.Logger;
15
var displayUrl = context.Request.GetDisplayUrl();
16
logger.LogDebug("Before Request with Uri '{Uri}'", displayUrl);
17
await next(context);
18
logger.LogDebug("After Request with Uri '{Uri}'", displayUrl);
19
});
20
app.Use(async (context, next) =>
{
var logger = app.Logger;
var displayUrl = context.Request.GetDisplayUrl();
logger.LogDebug("Before Request with Uri '{Uri}'", displayUrl);
await next(context);
logger.LogDebug("After Request with Uri '{Uri}'", displayUrl);
});
builder.Services.AddDbContext(optionsBuilder =>
1
{
2
optionsBuilder.UseSqlite("Data Source=app.db");
3
});
4
5
// ..
6
7
app.RegisterExpenseEndpoints();
8
9
10
app.UseExceptionHandler();
11
12
13
14
15
16
17
18
19
20
app.RegisterExpenseEndpoints();
builder.Services.AddDbContext(optionsBuilder =>
1
{
2
optionsBuilder.UseSqlite("Data Source=app.db");
3
});
4
5
// ..
6
7
8
9
10
app.UseExceptionHandler();
11
12
app.Use(async (context, next) =>
13
{
14
var logger = app.Logger;
15
var displayUrl = context.Request.GetDisplayUrl();
16
logger.LogDebug("Before Request with Uri '{Uri}'", displayUrl);
17
await next(context);
18
logger.LogDebug("After Request with Uri '{Uri}'", displayUrl);
19
});
20