Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno authored Dec 22, 2023
1 parent 68a8dd5 commit f52cad4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dotnet-observability/eShopLite/Products/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using Microsoft.EntityFrameworkCore;
vusing Microsoft.EntityFrameworkCore;
using Products.Data;
using Products.Endpoints;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<ProductDataContext>(options =>
options.UseSqlite(builder.Configuration.GetConnectionString("ProductsContext") ?? throw new InvalidOperationException("Connection string 'ProductsContext' not found.")));

// Add observability code here

// Add services to the container.
var app = builder.Build();

Expand Down

0 comments on commit f52cad4

Please sign in to comment.