.NET Core Console App with Dependency Injection, Logging, and Settings

  Рет қаралды 225,969

IAmTimCorey

IAmTimCorey

Күн бұрын

.NET Core has brought a lot of great benefits right into the .NET language. We get dependency injection, a much better configuration system, and we get a common logging system that is easy to use. The only problem is that mainly, we only get these things set up for us in web environments. What happens when we want to get these things running in a Console app? Well, it takes a bit of extra work, but it can be done. In this video, we are going to set up dependency injection, configuration using appsettings.json, and logging using Serilog in a Console application.
Source Code: leadmagnets.app/?Resource=Bet...
Mailing List: signup.iamtimcorey.com/
Purchase Courses: iamtimcorey.com
0:00 - Intro
1:49 - Creating Console App (.NET Core)
3:35 - NuGet references
7:29 - Editing csproj file in .NET Core
9:15 - Add application settings json file
10:46 - Define goals
11:30 - Builder setup: BuildConfig
21:12 - Serilog setup: LoggerConfiguration
25:04 - Host setup: CreateDefaultBuilder
30:11 - Program entry point Class
39:51 - Dependency Injection
43:04 - Calling entry point in Main()
45:21 - Configuration for Serilog in appsetings.json
50:10 - Runnning the application and fixing exceptions
55:02 - Recap, summary and concluding remarks
Thanks to Ralfs HBK for the chapter breakdown

Пікірлер: 693
3 жыл бұрын
When I see the "I" in the channel's name, I always think it's an interface.
@MarioMaletic
@MarioMaletic 3 жыл бұрын
lol
@YoloMonstaaa
@YoloMonstaaa 3 жыл бұрын
Truuue
@lborate3543
@lborate3543 3 жыл бұрын
Lol so true.
@ibrahimhussain3248
@ibrahimhussain3248 3 жыл бұрын
public class Myself: IAmTimCorey { // Now I can do whatever Tim can do... }
@ericjalbert9433
@ericjalbert9433 3 жыл бұрын
@@ibrahimhussain3248 For that you should derive the implementation rather than just implementing the interface... because you could say Throw new UnimplimentedMethodException() for each method.... lol
@TheJessejunior
@TheJessejunior 3 жыл бұрын
uowwww!!! great content as always, tim!! my skills have grown so much since i´ve started following your videos, I usualy watch them several times and they´re my first consulting material whenever I get doubts during daily job....
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I am glad my content has been so helpful.
@sathyajithkalyadan2971
@sathyajithkalyadan2971 2 жыл бұрын
Thanks Tim, you are a great teacher. The way you explain things makes it much much easier to understand and adapt.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@TaginusOfAinusgard
@TaginusOfAinusgard 3 жыл бұрын
I actually figured this out on my own when playing one day. However, there are tons of other things I learned in this video that I wasn't aware of. Subscribed!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Excellent!
@oncalldev
@oncalldev 3 жыл бұрын
As always a very clear, tight explanation of how things work in the .NET world. Thanks.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@myemailvl
@myemailvl 3 жыл бұрын
Thanks, Tim. I think your videos is the most useful upon all other programming tutorials on KZbin. Especially for people with some experience as a programmer.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great to hear! It is good to know that the training is valuable to folks with your level of experience.
@KhachaturStepanyan
@KhachaturStepanyan 3 жыл бұрын
So well put, I almost never come across a video where you follow tutorial step by step and it works, usually something is missing, something is forgotten thank you!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You're welcome!
@JoshuaKersey
@JoshuaKersey Жыл бұрын
This one had a lot of great information in it. Thanks Tim! Keep them coming!
@divanvanzyl7545
@divanvanzyl7545 3 жыл бұрын
Bro your videos are AMAZING. You are covering the topics that we want to learn about, but other people are not covering!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@AmitDileepKulkarni
@AmitDileepKulkarni 3 ай бұрын
Thanks Tim for teaching us dependency injection in a very simple way !
@mohammedal-mudhafar4602
@mohammedal-mudhafar4602 5 ай бұрын
Your content's trustworthiness has become my go-to, when looking for C#/.Net subjects.
@IAmTimCorey
@IAmTimCorey 5 ай бұрын
Thank you!
@88spaces
@88spaces Жыл бұрын
Thanks, Tim. This video helped me a lot. I liked the underscore tip. I've been wanting to figure that out for a while. And using Serilog looks very promising.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@oscarjr2088
@oscarjr2088 3 жыл бұрын
Thank you so much for this!! I discovered this video after struggling with migrating some code from the Framework to Core. The video demonstrated the functionality in a way that I could easily internalize and use. Subscribing to the Patreon is the least I can do. Be well!!!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it helped!
@panagiotisveranoudis3025
@panagiotisveranoudis3025 3 жыл бұрын
Great stuff, appreciate the time and effort you put into this. Really high quality material.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad you enjoyed it!
@wobblyrampack9655
@wobblyrampack9655 3 жыл бұрын
Wonderful! Thanks so much Tim. Trying to get up to speed quickly with C# and I learnt so much from this video.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Fantastic!
@JonathanPeel
@JonathanPeel 3 жыл бұрын
I especially enjoyed this video. I enjoy most of these videos, but I especially enjoyed this one. It is greater to watch this, even if you never intend to write a console app, and explains the DI that gets used when writing an ASP/Web app. I really like how you will always say "Don't do this in production" and then go back and fix it. It can get a little frustrating when going through tutorials that say things like that, but never show you how to actually do it 'properly'.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yeah, it is convenient to shortcut things since they aren't the purpose of the video, but I hate that too.
@TheHosuwisp
@TheHosuwisp 3 жыл бұрын
This video is just the epic way to understand complicated things. Well done.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@jexter7200
@jexter7200 2 жыл бұрын
Great video, thank you for taking the time to explain a few of the 'simple' things. If you don't know a few of them good enough, they are not simple
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@rodrigo6459
@rodrigo6459 3 жыл бұрын
This was a REALLY cool thing to watch... just like 2 weeks ago i was trying to add Dependency Inyection to my console app but i was looking forward to use native microsoft stuff.. Thanks for this!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it helped!
@heradsinn
@heradsinn 3 жыл бұрын
As always, extremely useful! I recommend this channel whenever I can to my colleagues and friends!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Awesome, thank you!
@MichaelMoore-zi2yf
@MichaelMoore-zi2yf 3 жыл бұрын
You have a great and simple way of explaining things. Very clear.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@ibrahimhussain3248
@ibrahimhussain3248 3 жыл бұрын
Yes. I would very much like to see the winforms and WPF version of this.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@Kevin-mb4xf
@Kevin-mb4xf 3 жыл бұрын
@@IAmTimCorey I would love that too. I started with the TimCo video of appsettings, but since I didn't finish the entire TimCo Video list, I didn't have any of the coding in place that you altered, which made it abracadabra for me. :) This video is awesome, am curious how well this translates to WPF project (from scratch). :D Thank you for making the time to making this video!
@mbrotto1970
@mbrotto1970 Жыл бұрын
I love the refactoring option (underscore) update...I have been using that for a while now...just popped back as I had lost it...oh and the content is great too ;o) Thanks for the great content Tim.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@pauldechampignon2287
@pauldechampignon2287 3 жыл бұрын
Cheers Tim. That is what I was looking for! Great film.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Excellent!
@josepiratilla
@josepiratilla 3 жыл бұрын
First of all excellent videos!. I wanted to add that at 38:00 another very good reason to pass parameters separately is to avoid the string manipulation if our log level is higher.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for the tip.
@oriwiesel5363
@oriwiesel5363 3 жыл бұрын
I so happy that you and I are living on the same time! Thank you!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@goodoleme747
@goodoleme747 3 жыл бұрын
I’m happy to see this. I’m a developer who primarily works on windows worker services / windows services, and a lot of backend applications where there is no user interaction. A lot of people forget that there are a whole realm of developers who aren’t primarily working on web.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Yep, I see you.
@parko1965
@parko1965 Жыл бұрын
Tutorials like these are little gems from this man.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks.
@kopilkaiser8991
@kopilkaiser8991 11 ай бұрын
I was looking for a video like this. Thanks to you. I was able to understand and achieve this.
@IAmTimCorey
@IAmTimCorey 11 ай бұрын
Awesome!
@BlahzayBeta
@BlahzayBeta 4 күн бұрын
The copy output directory tip was clutch! Exactly the issue I was having. Great video as always. Thanks
@IAmTimCorey
@IAmTimCorey 4 күн бұрын
Glad it helped!
@DCombsify
@DCombsify 9 ай бұрын
Thank you, Tim. This is exactly what i have spent the last day trying to understand. I should have looked at your video hours ago. lol
@IAmTimCorey
@IAmTimCorey 9 ай бұрын
I am glad it was helpful.
@maheshshinde4168
@maheshshinde4168 2 жыл бұрын
Thank you Tim! It is helping me understand this concept in detail.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Glad it was helpful!
@mohamadkibaly808
@mohamadkibaly808 Жыл бұрын
That's a great start for Console applications Thanks Tim 👍
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@lambda-snail
@lambda-snail 3 жыл бұрын
When you talked about how reading the error message helps, I remembered some really bad moments I have had with a certain C++ compiler xD I think the C# compiler generally does a good job though, as you say, so that's a relief. Thank you for the video, it's great as usual :)
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@jerrydsta1056
@jerrydsta1056 2 жыл бұрын
This is a fantastic videos that shows how to do dependency injections, logging etc. Highly recommended to all.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 2 жыл бұрын
Thanks for trusting Tim for your training.
@Benexdrake
@Benexdrake Жыл бұрын
Thank u for this Video, learning EF Core and DI in Blazor, but seeing this in Console is awsome.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@migueljara8692
@migueljara8692 9 ай бұрын
Thanks for sharing this, Tim., very well explained!
@IAmTimCorey
@IAmTimCorey 9 ай бұрын
You are welcome.
@hamidrezaashkiyan
@hamidrezaashkiyan 3 жыл бұрын
It's funny, I just needed this and you posted a video about it. AMAZING!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Hope you enjoyed it!
@fernandopelacini5662
@fernandopelacini5662 3 жыл бұрын
@@IAmTimCorey Same but for a Windows application so doing some changes after watching video
@juanmanuelgordillogonzalez7186
@juanmanuelgordillogonzalez7186 3 жыл бұрын
Cool boiler plate Tim, thank you!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@pietsmitsa
@pietsmitsa 2 жыл бұрын
Hi Tim, this was awesome as always. Thank you!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@garimasingh6341
@garimasingh6341 Жыл бұрын
You are brilliant , you have explained and cleared my doubts in such a beautiful manner
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Awesome!
@sunilanthony17
@sunilanthony17 3 жыл бұрын
Tim, this is pure gold: var svc = ActivatorUtilities.CreateInstance(host.Services); Save my life on a few console application that I'm now refactoring to hookup DI properly or the right way. Thanks a bunch.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@iambhanu7
@iambhanu7 3 жыл бұрын
Can you please explain :Why cant we we get the instance of ServiceCollection, then a ServiceProvider and use the "GetService" method on it to get the instance of the GreetingService.
@chursee
@chursee 3 жыл бұрын
Yes that should work like this: var svc = host.Services.GetService();
@conaxlearn8566
@conaxlearn8566 3 жыл бұрын
25:54 I totally agree! It was so pointless to look at Microsoft documentations a few years back. Now they even have little walkthrough tutorials, although for me to read the documentations can sometimes be a bit overwhelming. So tutorial videos like yours are still very precious. 😅
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I'm glad I'm able to add to the body of knowledge.
@arthinkers
@arthinkers Жыл бұрын
Very well laid out Tim. Thank you so much and you are right, Serilog is a good tool and with your code right here, anyone can be up and running in a few minutes.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@krsharodh
@krsharodh 2 жыл бұрын
Brilliant! It helped me with a coding assignment for a job.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Excellent!
@Die_MF_Die
@Die_MF_Die 2 жыл бұрын
Awesome lesson, Tim! its very useful for me. Thanks!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@ssushovan
@ssushovan Жыл бұрын
This is an excellent tutorial. Thanks, Tim!😊
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You're very welcome!
@ghostfreak1902
@ghostfreak1902 2 жыл бұрын
This was a magnificent video and helped me a lot. Thanks for your hard work and your awesome channel. Keep up the good work and thanks a lot :D
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@georgesaeid7231
@georgesaeid7231 2 жыл бұрын
This was so wonderful, thank you Tim.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@devongribbin9620
@devongribbin9620 3 жыл бұрын
Really great video Tim. Thank you.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@danielweaver6110
@danielweaver6110 3 жыл бұрын
Great video. I think showing how it is used in a WPF MVVM app would be great as well.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for your vote.
@tinoh.4573
@tinoh.4573 3 жыл бұрын
Realy great video! I would like to see a WPF example too. Thank you!
@TonTruong
@TonTruong 3 жыл бұрын
wow, this is exactly what i looking for in the morning
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great!
@sarracenogamer7375
@sarracenogamer7375 2 жыл бұрын
I love your tutorials step by step, thank you for share your knowlage :)
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You're very welcome!
@seijumimurasakibara5516
@seijumimurasakibara5516 Жыл бұрын
thank you for the thorough and well explained video! you just earned yourself a new subscriber :) more power to u sir!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@guillermovillalta6322
@guillermovillalta6322 3 жыл бұрын
This was AMAZING! Thanks Tim!!
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for expanding your skills with Tim.
@RobertOspara
@RobertOspara 2 жыл бұрын
Great tutorial :-) Tim treats wachers as human beings: inteligent and smart, because he is very inteligent and smart and tries to predict eventual question or request and imediatelly answer to it. What a great guy :-) But without self-exaltation.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
I appreciate the kind words.
@chillimanfly2859
@chillimanfly2859 3 жыл бұрын
Amazing as always, thanks Tim
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome
@aprivi
@aprivi Ай бұрын
As always, very good content!!!
@IAmTimCorey
@IAmTimCorey Ай бұрын
Thanks!
@jalvrus
@jalvrus 3 жыл бұрын
Thanks for the underscore tip; that will save me some time. I recently implemented something like this using AddHostedService to register the operation class (GreeterService in your case), and host.RunAsync to execute it. The trick with this approach is to call IHostApplicationLifetime.StopApplication at the end of the operation to terminate the process.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great tip! Thanks for sharing
@immino
@immino 3 жыл бұрын
Wonderful content, thank you Tim.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@serjnell4089
@serjnell4089 2 жыл бұрын
Best explanations on subject as always!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Glad it was helpful!
@bendunaway8296
@bendunaway8296 3 жыл бұрын
Dude, what a great video. I'm going to check out your site.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Please do! IAmTimCorey.com and KZbin channel kzbin.info/door/-ptWR16ITQyYOglXyQmpzw Purchases directly fund my ability to provide the free content. Thank you for being a big part of making these free videos available.
@medusaskull9625
@medusaskull9625 2 жыл бұрын
Excellent explanation as always
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thank you!
@shuaibahamed8692
@shuaibahamed8692 2 жыл бұрын
Dude I have learned so much from this channel
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Awesome!
@davidos533
@davidos533 2 жыл бұрын
Thank you! Very much, very good consideration, finally i understand DI.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Glad it was helpful!
@lockegarmin4615
@lockegarmin4615 3 жыл бұрын
Good video. Just a couple clean up items that were forgotten: 1. *host* is an IDisposable, so you should wrap it in a using in your main method or call Dispose() manually. This way it cleans up every dependency that you might have living in your dependency injection. 2. It's best practice to call Serilog's Log.CloseAndFlush() method at the end of your program since you created the logger outside of the hosting environment. If you configure Serilog in the .UseSerilog() method, you don't have to do this (assuming you are disposing host properly).
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are right. I meant to include the CloseAndFlush at the end and totally forgot to come back to it. Thanks for pointing these out.
@eleonoravasylenko7094
@eleonoravasylenko7094 2 жыл бұрын
Great lesson, good examples, thanks a lot!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@pez5491
@pez5491 3 жыл бұрын
Excellent! I wasn't doing anything for such toutorial :D
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for viewing and sharing you impressions.
@bobcynical2316
@bobcynical2316 Жыл бұрын
INCREDIBLE. AMAZING. LIFE-CHANGING. THANK YOU TIM. YOU HAVE SAVED MY LIFE. 🙃
@IAmTimCorey
@IAmTimCorey Жыл бұрын
I'm glad it was helpful.
@bobcynical2316
@bobcynical2316 Жыл бұрын
@@IAmTimCorey THE MESSIAH HAS REPLIED. WHAT IS EXISTENCE.
@marceloleoncaceres6826
@marceloleoncaceres6826 7 ай бұрын
Another great video, thanks a lot for sharing your knowledge and time,
@IAmTimCorey
@IAmTimCorey 7 ай бұрын
You are welcome.
@edelbertoreyes3663
@edelbertoreyes3663 3 ай бұрын
Thank you for sharing. It is very interesting and useful.
@IAmTimCorey
@IAmTimCorey 3 ай бұрын
You are welcome.
@sergio.diachenko
@sergio.diachenko 3 жыл бұрын
Tim, thank you so much, this is so usefull. Additional thanks for some tips and tricks.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@vnuuk
@vnuuk 2 жыл бұрын
This video helped - thank you!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@RalfsBalodis
@RalfsBalodis 3 жыл бұрын
This.will.be.hard.to.chew. Thanks for the explanations!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You're welcome!
@shashankkhandelwal3514
@shashankkhandelwal3514 3 жыл бұрын
Hi Tim 🙋‍♂️ I really love the way you explain. I have a request. Can you make a series on different types design patterns. I know we already have one video for singleton design patterns but there are other too. Thank you 😊
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
They are on the list.
@scottridings6008
@scottridings6008 3 жыл бұрын
Best explainer on the internet!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@schh486
@schh486 3 жыл бұрын
I would love to see a continuation of gRPC that goes more in depth, i cant really seem to find any good advanced guides for c# on gRPC including things like Authentication, Authorization, Security, sending caller information metadata, logging etc etc. That would be great! Thanks for all the great stuff you put out, i was just working in my brand spanking new gRPC console app and thought, hmm how do i get dependecy injection working and i found this :)
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@otmanm4095
@otmanm4095 3 жыл бұрын
Thank you very much, you make very great content!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I appreciate that!
@jojyvarghese174
@jojyvarghese174 3 жыл бұрын
Very nice and useful tutorial
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@teijeterbals1203
@teijeterbals1203 3 жыл бұрын
Wow. That UnderScore tweak from 33:57 is brilliant! Never knew this, and never understood why this isn't the default
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Tips to make coding easier. I thought he just made LEARNING easier!
@MrKaviraj75
@MrKaviraj75 3 жыл бұрын
Hi Tim I really appreciate you doing ML.NET in C#. There are very few tutorials out there, and they are not explaining things well as you. Hope you do ML.NET series :)
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@yourittrainer3196
@yourittrainer3196 Жыл бұрын
Awesome video Time. Thank you so much
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@user-pt7lu7cd7c
@user-pt7lu7cd7c 3 жыл бұрын
I think I need to subscribe. Thanks for the lesson.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@nguyenphu3552
@nguyenphu3552 2 жыл бұрын
Thanks, it's very useful ^^
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@Tolg
@Tolg 3 жыл бұрын
It would be awesome if you could do a video on how we would best create Unit Tests for such a project and test the services that are expecting the ILogger and IConfiguration to be dependency injectected.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Tim has done multiple videos on Testing, but I will add the suggestion to his list. Explore these to see if they address what you need - kzbin.infosearch?query=test
@weifengmao
@weifengmao 3 жыл бұрын
Interesting approach I usually use service providers in combination with service collection to achieve Di outside aspnetcore
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks for sharing
@simoncampbell-smith6745
@simoncampbell-smith6745 3 жыл бұрын
Great Video Tim, One question, when the service creates the instance of GreetingService How does it know what values to set the constructor parameter objects to? Can you specify them?
@ricardogriffith9384
@ricardogriffith9384 2 жыл бұрын
Awesome video!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks!
@rigel_riggs
@rigel_riggs 3 жыл бұрын
I really love your videos. My only contention (and this is just the unfortunate reality for myself) is that I don't have access to Nuget packages at my workplace, whatsoever. I still learn plenty though.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
That's rather unfortunate and something that I would recommend you talk to management about (you probably have already but tell them Tim says they should change their stance). NuGet provides you with pre-built pieces of code that allows you to not reinvent the wheel each time. Further, .NET Core itself relies on NuGet packages to add to it. Instead of making one bloated system, Microsoft created NuGet packages so that we can add just the things we need.
@Otonium
@Otonium 3 жыл бұрын
So enjoyable and clear.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad you enjoyed it!
@rociomejia7356
@rociomejia7356 3 ай бұрын
Tim I cannot give so many thumbs for all times I see this video. :)
@IAmTimCorey
@IAmTimCorey 3 ай бұрын
Thank you!
@MrFEMGM
@MrFEMGM Жыл бұрын
Excellent video.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thanks!
@rorylinnane9076
@rorylinnane9076 3 жыл бұрын
Nice video bud👍
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@AlbertoMonteiro
@AlbertoMonteiro 3 жыл бұрын
Awesome, you have a very nice didactic
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you very much! I try.
@nacertabib3158
@nacertabib3158 3 жыл бұрын
Hello Tim, I really appreciate what you do. is it possible please to do some videos about the internals of technologies in order to learn what is behind the magic. Thank you
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@mrsajjad30
@mrsajjad30 2 жыл бұрын
Thank you for a great video. Please make a tutorial on how do we set up these services in a WFP application?
@PaulSmithGainesville
@PaulSmithGainesville Жыл бұрын
Thanks Tim!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@user-yv2tb1rq2h
@user-yv2tb1rq2h 2 жыл бұрын
Это великолепно, спасибо большое! => It's great, thank you very much!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@Dotnetexplorer
@Dotnetexplorer 2 жыл бұрын
Great Content
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks!
@tomjones984
@tomjones984 3 жыл бұрын
I'm liking the videos, very informative! My only gripe is that you elaborate a bit too much on simpler topics when the subject suggests a more advanced user. E.g. in this particular video you're looking at more complex things such as DI, but you're also guiding viewers through how to add packages and using statements, and basic Visual Studio usage which I don't think is necessary for more advanced topics and drags out the video length unnecessarily. If you haven't done one already, I recommend making a separate video specific to these basic setup/IDE-specific features, which you could then simply reference as and when required.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for the feedback. Tim believes in giving context for what he is teaching and that takes time. His goal is not entertainment or just to dump knowledge on you but true education. Its a constant balancing act and your feedback helps.
C# Logging with Serilog and Seq - Structured Logging Made Easy
1:07:56
100❤️
00:20
Nonomen ノノメン
Рет қаралды 72 МЛН
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 1,5 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 35 МЛН
Dependency Injection in .NET Core (.NET 6)
1:00:32
IAmTimCorey
Рет қаралды 181 М.
Intro to Records in C# 9 - How To Use Records And When To Use Them
1:19:44
Delegates in C# - A practical demonstration, including Action and Func
1:09:11
Introduction to ASP.NET Core MVC in C# plus LOTS of Tips
1:03:56
IAmTimCorey
Рет қаралды 329 М.
Apple Is at Start of AI Supercycle, Wedbush's Ives Says
3:51
Bloomberg Television
Рет қаралды 2,6 М.
100❤️
00:20
Nonomen ノノメン
Рет қаралды 72 МЛН