Let’s assume there is a .net web api application and that the developer wants to use a different value of a nested property than the one in application settings. To override this property value in the Azure App Service, special attention needs to be given to how the key will be declared under the Configuration section for the nested application…
Visual Studio 2017 is now available to download, and one interesting feature thereof is connected services, which enable connections between your app and any service on-premises or in the cloud. In this post we are going to demonstrate how easy it is to connect your asp.net core web app to Application Insights. “Connected Services” is the new “Add Connected Service” or “Add Service Reference” feature…
Some really easy ways to improve performance in your asp.net core web application are: response caching, which adds cache-related headers to responses, to reduce the number of requests a client makes to your web server; compressing response using gzip to reduce its size. You may start with the default asp.net core web application, apply the above steps and check the result. Setup…
In this tutorial we are going to create a simple ASP.NET 5 web application on Mac, use SignalR to push events from server to connected clients and then deploy to Azure through a git repository. What is ASP.NET 5? ASP.NET 5 is a new open-source and cross-platform framework for building modern cloud-based Web applications using .NET. It consists of modular components with minimal…
In Entity Framework when you want to insert multiple items in your database you usually add your objects in your DbSet and then call context.SaveChanges at the end. This action, you may think, performs bulk inserts in your db but in reality things are a bit different. In the following example, we are going to generate multiple objects from our model Products and try to…
Let’s assume you have the following model with a non-required string property. While you are trying to save this object in your Db using Entity Framework you may see that the string property in your record will not be Null but (empty string). To overcome this you need to override SaveChages, SaveChangesAsync method in your DbContext indicating that all string properties with empty values should…