Commit Graph

5 Commits (707cadd9a2b020aa9455fe53adb388713eddd8a3)

Author SHA1 Message Date
Kirk Larkin a57c0d5a06
General DI updates (#19515)
* General DI updates

* A few more sections

* Another small section

* More sections

* Small tweaks to previous commit

* Another section (2 left)

* Almost there (1 left)

* Final section

* A few final? touches

* A few final? touches
2020-08-20 13:39:01 -10:00
Rick Anderson 37660a2e38
Anti pattern di/ra/xboxeer (#19468)
* Add anti-patterns example in DI recommendations 

According to https://github.com/dotnet/AspNetCore.Docs/pull/19156, we'd like to add a new anti-patterns to DI recommendations in DI docs. The reason is in Stackoverflow, some community member is suggesting to call BuildServiceProvider to resolve service instance in ConfigureService method(https://stackoverflow.com/questions/31863981/how-to-resolve-instance-inside-configureservices-in-asp-net-core), which will result to couple issues as described in this PR. So it is better to add this as an anti-patterns in recommendations and provide an alternative way to address developers requirement.

* Add ✔️and before correct and incorrect

Add ✔️and before correct and incorrect

* xboxeer anti-pattern DI PR

* clean up

* clean up

* clean up

* clean up

* clean up

* clean up

Co-authored-by: Elendil <yuzheng1@microsoft.com>
2020-08-11 21:52:38 -10:00
Rick Anderson dc1237f61b
DI rewrite (#19271)
* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* work

* work

* work

* work

* work

* work

* work

* work

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* DI Antipatterns

* react to feedback

* react to feedback

* Apply suggestions from code review

Co-authored-by: Kirk Larkin <6025110+serpent5@users.noreply.github.com>

* react to feedback

* react to feedback

* react to feedback

* react to feedback

* react to feedback

* react to feedback

* react to feedback

Co-authored-by: Kirk Larkin <6025110+serpent5@users.noreply.github.com>
2020-08-11 21:42:11 -10:00
Luke Latham 4a16dc236d
3.1 Sample Updates (#16170) 2019-12-12 17:31:22 -06:00
Luke Latham 259dcfeca2 DI topic updates for 3.0 (#14471)
* DI topic updates for 3.0

Updates

* React to feedback

* AddControllersWithViews over UseMvc for 3.0 Autofac example

* Nits

* Link out for container replacement scenarios

* Content for Generic Host Startup injection
2019-09-24 09:31:50 -10:00