
This video will give you an overview about the course.
Nullable reference types are a new feature in C# 8.
• Compare the same with nullable value types
• Activate NullableContextOptions in Visual Studio
• Demonstrate nullable reference types
Async/await is very powerful when it comes to managing async data, but it does not help with streams.
• Introduce IAsyncEnumerable
• Mock async streams with Task.Delay
• Demonstrate await for each, with async streams
In C# 8, we can quickly create ranges of indices, when working with arrays and collections.
• Introduce the range types
• Introduce the from end operator and open-ended ranges
• Demonstrate live code
C# 7 introduced patterns, but with C# 8 come recursive patterns have been introduced.
• Create a custom HttpException
• Create a reporter that makes use of recursive patterns, to report HTTP exceptions
The ternary operator is great for choosing between two options, but what if we have more options, and a complex if/else structure does not help.
• Improve the previous reporter with switch expressions
Target-typed new expressions are great at inferring the type from the supplied context.
• Introduce target-typed new expressions
• Use them with arrays
We need to create a new empty solution and install the required dependencies.
• Create an ASP.NET Core web API project on an empty solution
• Install Entity Framework Core
• Install identity-related dependencies
Async/await is very powerful, when it comes to managing async data, but it does not help with streams.
• Create an ApplicationUser model inheriting from IdentityUser
• Run migrations
Some operations have different validation entries and different properties, than the ones that can be found in domain models.
• Create a UserSignUpVM
• Create a SignInVM
• Map them with AutoMapper
Write an identity controller from scratch.
• Write it using the GenerateAccessToken method
• Write the sign up endpoint
• Write the sign in endpoint
We have successfully created an account controller, but more testing is needed.
• Test the sign up endpoint
• Test the sign in endpoint
We need to begin working on our web API, by installing EF Core and other dependencies, and also by setting-up our models.
• Install Entity Framework Core
• Create a subscription and a plan model
• Run migrations
Next step in our journey will be to write the controllers.
• Auto-generate controllers using Visual Studio
• Use EF Core lazy loading to load each subscription plan
Private routes need authentication.
• Add the authorization attribute
• Set-up authentication in the startup class
• Extend all PlanController endpoints
We have the endpoints we now need to test that they work, and also that the authentication works.
• Sign a user app
• Use the user’s token to create a plan
• Retrieve the newly created plan
WPF was not available to .NET Core until version 3.0, which means most .NET Core only developers are not familiar with XAML, which is the markup language used to create the user interface.
• Introduce WPF in the context of the whole .NET ecosystem
• Describe code-behind files
• Write a sign up form from scratch and run the new project
WPF was built to work perfectly with the MVVM pattern. We need to describe it before moving forward to apply it.
• Theoretical presentation of the MVVM design pattern
• Build the project’s directory structure
Our desktop app is going to be an online-only app. This means it needs to be able to communicate with the API we built in the previous section.
• Create two interfaces: IAuthService and IPlansService
• Implement the interfaces
• Use static HttpClient to boost performance
We need to handle authentication state in our app, if we are to only allow logged in users to access certain states.
• Go back to AuthService and add a GetAccessToken method
• Store access token internally in AuthService
• Create a GetRequest template method to keep the service DRY
We have four pages-states and we need to be able to navigate.
• Create the views
• Go to MainWindow and setup bindings between view models and views
• Create click handlers in the code behind to handle navigation
We have some unfinished view models. We need to add more logic and bindings with the views.
• Add dependencies to services inside all three view models
• Implement the INotifyPropertyChanged interface
• Create commands for signing in and up
During all previous videos, our desktop app was in no shape to be executed. Now is the time for its first run.
• Run the app
• Demonstrate a user sign up and how they are redirected to the dashboard
• Sign in with a user that has a plan
There are two ways in which we can build mobile applications with Xamarin. We need to make the distinction clear.
• Define Xamarin
• Define Xamarin.Forms
• Explain why we would be choosing Xamarin.Forms
Visual Studio does not come with Xamarin installed by default.
• Open Visual Studio Installer
• Install Xamarin
• Create a new project and set-up an Android emulator
We want to achieve maximum code reuse between the mobile and desktop projects. Authentication is a major part of that process.
• Create a new shared library for targeting the .NET standard
• Set-up dependency injection
• Handle authentication properly
We have three pages. A sign up page, a sign in page, and a dashboard. We want to be able to navigate between all of them.
• Convert MainPage into a NavigationPage
• Implement click handlers for the navigation buttons
• Watch for changes in the access token and navigate accordingly
So far, our pages are in no way connected to the view models.
• Work with data binding
• Create a list of plans in dashboard
• Install ngrok, change the endpoints, and test the application
Two of the most important characteristics of reactive microservices are reactivity and isolation.
• Describe the microservices architecture
• Describe reactivity
• Describe isolation
Reactive microservices should follow the no sharing rule, while also avoiding shared state. In this section, we need to describe the most well-known patterns in a microservices oriented architecture.
• Describe API Gateways
• Get introduced to CQRS and event sourcing
• Get introduced to Service Fabric
In order to develop Service Fabric microservices, we need to install the Service Fabric SDK.
• Download the Service Fabric SDK
• Install the Service Fabric SDK
• Start a new project
We need to move our code from the monolithic application to the new project.
• Migrate the identity service
• Migrate the plans service
We need an API Gateway in order to provide unified access to our various microservice-based APIs.
• Create a new API Gateway project
• Install Ocelot
• Set downstream and upstream paths
We need Docker in order to create containers.
• Download Docker CE
• Install Docker
• Configure settings
Before we can deploy our APIs to the cloud, we have to containerize them.
• Containerize identity service
• Containerize API
• Add a Docker Compose project
We need to create some resources on Azure to use, when deploying our app on Azure.
• Create a database service
• Work with new connection strings
Everything is ready for the deployments to begin.
• Deploy to app service with Visual Studio
In this video, you’ll learn about the summary of this course.
• Discuss all the important points of the course
• Learn about what should you do next
C# is rapidly approaching the third decade of its newest features. It helps in preventing the null reference exceptions that have riddled object-oriented programming. C# and .NET Core combined give developers a new sense of robustness, flexibility, and efficiency to build amazing applications inside and outside the MS ecosystem. There are several improvements and additions to the language and framework in this upcoming release.
After quickly taking you through C# 8 and how .NET Core 3.0 works, you'll explore topics such as packaging and deploying your own libraries, working with Visual Studio and other relevant tools, and using common libraries to work with collections, performance, databases, and encryption.
The course practically demonstrates the major types of applications that you can build and deploy cross-device and cross-platform—web, mobile, and desktop alike.
About the Author
Dimitris Loukas is a software engineer who is currently part of a growing start-up building a revolutionary referral marketing platform with Node.js, Angular, MySQL, Redis, and Docker. He also develops trading software applications using C#, Aurelia, and TypeScript.
He is an author at Packt and has developed many video tutorials in C#, .NET Core, and TypeScript. He has worked for two start-ups in the past, is active in the open-source community, and loves taking up small side projects. He has developed microservices using C# and Node.js and has also mastered Angular, Aurelia, and Vue.js. He is an early adopter of .NET Core and is fascinated by modern JavaScript and where the web is going.