The dotnet core approach for HttpClient brings in a Factory implementation for the instantiation, using dependency injection. Instead of creating a static constructor and maintaining a static instance of HttpClient at all times for reuse, dotnetcore recommends using IHttpClientFactory injectable for creating client.
An instance of HttpClient contains all the settings and configurations required for making requests and defines its own isolated set of sockets and connection pool, and hence is isolated from requests sent by any other instance defined.
A UnitOfWork pattern is just a simple class with one method for Saving the context state, along with properties representing every related Repository which need to be processed as a whole. And all these Repository classes receive the same context object reference on which the single Save() method works on.
Docker-Compose is a configuration file which can also facilitates developers in creating "multiple services" and facilitates these containers to interact among themselves.
A ViewComponent works as an individual entity with its own encapsulated responsibility and a View to bind the model data. It is much more powerful, runs independently without being dependent on a Controller endpoint or a Route and is invoked by the Layout rather than the view itself
A Startup class is a simple C# class used to configure and construct an application request pipeline. It is one of the very first components which are picked up and executed by the aspnetcore runtime during application bootstrapping.
When developing client-server interactive applications in which the client calls over the server API requesting for a resource (data) there can be situations where the requests or specifically the "preflight" requests fail from the client which is an indication of Cross-Origin Request issues or shortly called CORS issues.
Off late, Single-Page Applications or SPAs have become the most sought after client facing application stacks, for their light-weight and high performance nature. In this architecture, the server focuses on data logic and supplies data to the client in the form of RESTful APIs, while the client application renders the fetched data onto a fluid and dynamic layout.
In the previous article, we have looked at how we can read from an azure storage container and use it within an aspnetcore application. In this section, we shall look at how we can write some content to azure storage by means of the Storage SDK
Microsoft Azure Blob Storage is a storage service offered by Microsoft Azure as a part of its Cloud Suite of tools and services, which provides a high speed, secure and reliable data storage option for applications. Let's talk about how we can access files from an existing Azure Storage Container via Storage SDK in an aspnetcore application.