Dependency Injection in .NET Core 2.0 by Tadit Dash
(price excluding 0% GST)
Author:
Tadit Dash
Category:
Engineering & IT
ISBN:
9781787129573
Publisher:
Packt Publishing
File Size:
9.56 MB
(price excluding 0% GST)
Synopsis
Key FeaturesIdentify when to use the constructors, parameters, setters, or Interface Injection, for best resultsBuild dependencies not only for MVC within .NET but also for other frontend tools such as AngularCreate specific components or services to cover discrete and separate pieces of functionality and call them when needed.Book Description.NET Core provides more control than ever over web application architectures. A key point of this software architecture is that its based on the use of Dependency Injection as a way to properly implement the Dependency Inversion principle proposed in the SOLID principles established by Robert C. Martin.With the advent of .NET Core, things have become much simpler with Dependency Injection built into the system. This book aims to give you a profound insight into writing loosely-coupled code using the latest features available in .NET Core. It talks about constructors, parameter, setters, and interface injection, explaining in detail, with the help of examples, which type of injection to use in which situation. It will show you how to implement a class that creates other classes with associated dependencies, also called IoC containers, and then create dependencies for each MVC component of ASP.NET Core. Youll learn to distinguish between IoC containers, the use of Inversion of Control, and DI itself, since DI is just a way of implementing IoC via these containers. Youll also learn how to build dependencies for other frontend tool such as Angular. You will get to use the in-built services offered by .NET Core to create your own custom dependencies.Towards the end, well talk about some patterns and anti-patterns for Dependency Injection along with some techniques to refactor legacy applications and inject dependencies.What you will learnUnderstand the concept of DI and its implications in modern software constructionLearn how DI is already implemented in todays frameworks.Analyze how DI can be used with current software to improve maintainability and scalability.Learn the use of DI in .NET CoreGet used to the possibilities that DI offers the ASP.NET Core developer in different scenarios.Learn about good practices and refactoring legacy code.About the AuthorMarino Posadas is an independent senior trainer, writer, and consultant in Microsoft Technologies and Web Standards. He is a Microsoft MVP in C#, Visual Studio, and Development Technologies; an MCT, MCPD, MCTS, MCAD, and MCSD; and he was the former Director of Development in Spain and Portugal for Solid Quality Mentors.Marino has published 15 books and more than 500 articles on development technologies in several magazines and online publications. The topics covered in his books range from Clipper and Visual Basic 5.0/ 6.0 to C # and .NET- safe programming, programming with Silverlight 2.0 and 4.0, and Web Standards.His latest books are Mastering C# and .NET Framework, by Packt, and The Guide to Programming in HTML5, CSS3, and JavaScript with Visual Studio. He is also a speaker at Microsoft events, having lectured in Spain, Portugal, England, the US, Costa Rica, and Mexico.His website also contains developers resources and videos, in English and Spanish, interviewing representatives of the Microsoft and Web Standards development world.You can follow him on Twitter at @MarinoPosadas.Tadit Dash is a software engineer by profession. As a software engineer, he usually works for 8 to 9 hours daily. Besides his daily work, he contributes to both online and offline communities. He co-founded the first technical community in his state, named Microsoft Developers Community Odisha, which is devoted to spreading awareness of the newest trends in technology among developers. This community organizes events and workshops in orphanages, schools, and colleges.He writes articles and blogs and creates demos and videos for fellow programmers. Answering questions on online forums and social channels are the activities he enjoys the most. Due to his exceptional contribution to the technical community, Microsoft has awarded him with the Microsoft Most Valuable Professional accolade since 2014. CodeProject has awarded him the CodeProject MVP accolade (the first from Odisha and three times in a row for the years 2014, 2015, and 2016). For his constant mentorship, IndiaMentor featured him as a Young Mentor on their site.He was recognized by DZone and awarded the Most Valuable Blogger accolade. He was awarded the Star and Achiever accolade from his organization. Motivating students in his sessions is something he is popular for. He is a regular technical and motivational speaker. He has spoken at many local events organized by different communities. He was a featured speaker in DevTechDay Nepal.Table of ContentsThe SOLID Principles of Software Design Dependency Injection and IoC containersDependency Injection in .NET Core Dependency Injection in ASP.NET Core Object CompositionObject LifetimeInterceptionTypes of Injection/ PatternsAnti-Patterns and misconceptions on Dependency Injection DI in thirdparty tools Best practices and other related techniques
Reviews
Be the first to review this e-book.
Write your review
Wanna review this e-book? Please Sign in to start your review.