by bill-s, 2018-12-28T13:40:24.578Z
Azure Tips and Tricks (azuredev.tips) is a series that I created a year ago where I document my favorite secrets, shortcuts and handy features using Azure. I quickly came to appreciate the value of short and straight-to-the-point guidance for common scenarios that developers face every day. Over the last year I’ve gone from just a few posts to more than 150 tips spanning the entire Azure platform.
by bill-s, 2018-12-28T13:35:07.709Z
One of the measure that we don’t care much about is the startup time of RavenDB. Whatever it takes 5 seconds or 15 seconds is of little concern to us. Whatever it takes 15 seconds or 3 minutes, however, is something that we most certainly want to pay attention to.
One of our customers has an interesting use case. They are running on Azure machines and take full advantage of the multiple storage options that they have available there. In particular, their journals are using a premium storage disk but their data is residing on a a large (and slow) disk. This is because they have quite a lot of data. One of their indexes just exceeded the 256GB mark, for example.
by bill-s, 2018-12-28T13:42:12.653Z
Modern applications are increasingly complex systems that involve multiple technology stacks and cloud-native services. Orchestrating an automated release pipeline for these systems can be challenging. Azure Pipelines provides powerful, easy-to-use continuous integration (CI) and continuous delivery (CD) services you can use to build and test your app and then deploy to your intended targets. In this article, we’ll provide an overview of the key concepts of Azure Pipelines and discuss deployment scenarios for various Azure services. We’ll also walk through a detailed scenario for creating a pipeline for a .NET Core app that targets Docker containers in Azure Kubernetes Service (AKS). Finally, we’ll show you the next generation of CI/CD in which your YAML pipeline is configured as part of your code.
by jeremylindsay, 2018-12-27T17:28:52.610Z
I thought I’d do a little write up of a couple of popular library options that I’ve used for accessing web services – RestSharp and Flurl. I find that learn quickest from reading example code, so I’ve written sample code showing how to use both of these libraries with a few different publically available APIs.
by bill-s, 2018-12-28T13:52:01.132Z
It seems like this time of year anyone with a blog is doing some sort of ‘advent calendar’, i.e. 24 posts leading up to Christmas. For instance there’s a F# one which inspired a C# one (C# copying from F#, that never happens)
However, that’s a bit of a problem for me, I struggled to write 24 posts in my most productive year, let alone a single month! Also, I mostly blog about ‘.NET Internals’, a subject which doesn’t necessarily lend itself to the more ‘light-hearted’ posts you get in these ‘advent calendar’ blogs.
by bill-s, 2018-12-29T11:38:29.670Z
In one of the .NET Core trainings I was conducting recently, one of my students asked about uploading files using .NET Core application. Here's a solution. When we use ASP.NET MVC to upload a file, we use the HttpPostedFileBase class. This class is used to access the files uploaded by the client in an MVC application. In .NET Core, the IFromFile interface is used to represent a file that is sent with the HttpRequest. In this article we will use the IFromFile interface to upload the file. We will use Visual Studio 2017 and .NET Core 2.1. Information about the IFromFile interface can be read from this link.
by bill-s, 2018-12-28T13:34:24.096Z
A few years ago, Microsoft introduced the HttpClient class as a modern substitute for HttpWebRequest to make web requests from .NET applications. Not only is this new API much easier to use, cleaner, and asynchronous, but it is also easily expandable.
The HttpClient class has a constructor that accepts a HttpMessageHandler.
The latter is an object that accepts a request (HttpRequestMessage) and returns a response (HttpResponseMessage); the way it does it is completely dependent on the implementation. By default, HttpClient uses HttpClientHandler, a handler that sends a request to a server on the network and returns the response from the server. In this article we will create our own implementation of an HttpMessageHandler by inheriting an abstract class named DelegatingHandler.
Finally, for all this to be possible, HttpClient must not be used directly, but used with the dependency injection that allow mocking by using IHttpClientFactory interface.
by bill-s, 2018-12-28T13:35:49.924Z
This is a quick post to give you some feedback about an experiment I just made with the Scriban Text Templating Library to add support for async/await automatically from the existing synchronous code, all of this done by using Roslyn.
If you have an existing code base that works beautifully in a synchronous manner, but you would like also to provide a path for async/await patterns, you don’t want to rewrite your entire code base to the async/await pattern, or to drop synchronous code for async/await only. It would either be a huge burden to maintain two code paths doing almost the same thing, or the use async/await only would actually perform significantly worse than the synchronous version, even if you are using the recently introduced ValueTask<T>
by bill-s, 2018-12-28T13:41:41.954Z
The ML.NET library is a new open source collection of machine learning (ML) code that can be used to create powerful prediction systems. Many ML libraries are written in C++ with a Python API for easier programming. Examples include scikit-learn, TensorFlow, CNTK and PyTorch. However, if you use a Python-based ML library to create a prediction model, it’s not so easy for a .NET application to use the trained model. Fortunately, the ML.NET library can be used directly in .NET applications. And because ML.NET can run on .NET Core, you can create predictive systems for macOS and Linux, too.
by bill-s, 2018-12-28T13:33:40.352Z
As you’re building out an API it’s important to keep response times in check. In many cases slowness is due to database calls, web requests, and other network operations. But, elevated response times can also be due to in-memory operations as part of the ASP.NET Core pipeline.
by bill-s, 2018-12-28T13:42:52.165Z
Machine learning (ML) is being used in a wide range of applications, from autonomous cars and credit card fraud detection to predictive maintenance in manufacturing and beyond.
But there’s a problem. Building ML solutions is complex and requires highly skilled personnel with Ph.D.s in mathematics or other quantitative fields. The demand for data scientists has outpaced supply, inhibiting adoption of ML among enterprises. Many companies have vast stores of data, yet they’re unable to employ predictive analytics to improve business decision making and achieve success.
The automated ML capability in Azure Machine Learning is designed to overcome these obstacles and make AI more accessible to every developer and every organization. In this article, I’ll show how automated ML can be used to quickly build an energy demand forecasting solution.
by bill-s, 2018-12-28T13:39:22.569Z
.NET Core 3.0 is the next major version of the .NET Core platform. This article walks through the history of .NET Core and demonstrates how it has grown from basic support for Web and data workloads in version 1 to being able to run Web, desktop, machine learning, containers, IoT and more in version 3.0.
by bill-s, 2018-12-28T13:51:24.430Z
The allocator and garbage collector components of the CLR may have a real impact on the performances of your application. The Book of the Runtime describes the allocator/collector design goals in the must read Garbage Collection Design page written by Maoni Stephens, lead developer of the GC. In addition, Microsoft provides large garbage collection documentation. And if you want more details about .NET garbage collector, take a look at Pro .NET Memory Management by Konrad Kokosa. In this post, I will focus on the events emitted by the CLR and how you could use them to better understand how your application is behaving, related to its memory consumption.
by regianefolter, 2018-12-26T18:30:20.654Z
In the last couple of years, we’ve noticed a trend in companies searching for a cross-platform solution for mobile apps. The main reasons are reduced time to market and maintenance costs. We’ve found that Xamarin fits the bill in these areas and has some major advantages for our developers.
by bill-s, 2018-12-28T13:43:16.122Z
I hope I’m not embarrassing myself to express how excited I am by Visual Studio Live Share! The first time I saw a demonstration of an early preview, I immediately found an excuse to use it in a live streaming session where Jeff Fritz and I worked on a .NET Core project together, each on our own computer, nearly 400 miles apart.
by karthikchintala, 2018-12-29T03:53:47.663Z
This post explains why a Func delegate is not translated to appropriate SQL commands as one would except.
The article also draws some source code from Microsoft reference source code to explain what happened when .Where() method is invoked on a func delegate.
by bill-s, 2018-12-28T13:39:49.321Z
Visual Studio 2019 introduces exciting improvements and new features aimed at optimizing developer productivity and team collaboration. Whether you’re using Visual Studio for the first time or have been using it for years, you’ll benefit from features that improve all aspects of the development lifecycle—from smoother and more focused project creation to cloning from repository workflows, to driving the maintainability and quality of your code. Team and open source collaborative workflows are improved, as well.