© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
moon

❔ builder.Services.AddDbContext<>

builder.Services.AddDbContext<UygulamaDbContext>( options => options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddDbContext<UygulamaDbContext>( options => options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));

The 'options' here, where did it exactly come from, and we were also able to access it by putting a dot (options.)? Is it something like the callback in JavaScript?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ read-only builder.Services
C#CC# / help
2y ago
❔ Question on how AddDbContext works
C#CC# / help
3y ago
DI: Registration of services through a builder.
C#CC# / help
2y ago
✅ ASP.NET Core: Confusion with builder.Services.AddTransient() and App Lifetime Management
C#CC# / help
2y ago