Skip to main content

dotnet

.NET Core, Roslyn and Code Generation
·485 words·3 mins
dotnet roslyn
For ages I’ve been using T4 templates as main tool for code generation and scaffolding, but now that I’m an absolute fan of Visual Studio Code and .Net Core I need to explore other options such as Yeoman, Scripty and Roslyn. This post is just the result of my first and simplest experiment with .Net Core, Roslyn and Code Generation.
.Net Core and NancyFX: can writing a WebApi get any simpler?
·581 words·3 mins
dotnet aspnetcore nancyfx
Last Thursday I attended a Meetup hosted by my friends of @MsCodersMadrid in Madrid where, thanks to @snavarropino, I learned a bit about the NancyFX open source framework. I really couldn’t believe my eyes when I saw how simple it is to use NancyFX to write a Web API. Two of the things that got my attention were: the out of the box content negotiation and zero configuration dependency injection.
Debug ASP.NET Core on Docker with Visual Studio Code
·455 words·3 mins
devops dotnet aspnetcore debugging visual studio code
Last Thursday I started reading the Free eBook: “Containerized Docker Application Lifecycle with Microsoft Tools and Platform” by Cesar de la Torre. The book is really easy to read and really gives the reader a glimpse on the way to approach the overall application lifecycle when using containers and Microsoft Technologies. One of the interesting things he mentions is the ability to debug your source code inside a container using Visual Studio or Visual Studio Code, so I decided to try it out and Debug ASP.NET Core on Docker with Visual Studio Code
First steps with .NET Core Tools MSBuild "alpha"
·518 words·3 mins
dotnet msbuild
On November 16th, Microsoft announced the .NET Core Tools MSBuild"alpha". I’ve been developing .Net Core applications with Visual Studio Code for a while now, and I needed to try the new tooling. In this post I’ll show you which were my First steps with .NET Core Tools MSBuild “alpha” Installing .NET Core SDK 1.0 Preview 3 build 004056 # The first step was to install the new tools from: .NET Core SDK 1.0 Preview 3 build 004056
Step by step: Expose ASP.NET Core over HTTPS with Docker
·442 words·3 mins
azure dotnet aspnetcore docker https Kestrel openssl
This week I decided to modify the sample of my previous post: Step by step: Scale ASP.NET Core with Docker Swarm so you can add TLS to your ASP.NET Core applications and Dockerize it. Let’s see how I changed the application in order to make it work: Add HTTPS support for Kestrel # I added the following line to the dependencies in the project.json file.
Step by step: Scale ASP.NET Core with Docker Swarm
·388 words·2 mins
azure dotnet aspnetcore docker
A few weeks ago I posted Step by step: ASP.NET Core on Docker were I showed how to build and run a Docker image with an ASP.NET Core application. Today I bring you: Step by step: Scale ASP.NET Core with Docker Swarm so you can scale out or in the same application. Assuming you have Docker 1.12 or later installed and running, follow this steps:
Use .NET Core to Create Azure Blob Storage SAS Keys
·270 words·2 mins
azure dotnet storage account
If you intend to use the WindowsAzure.Storage library with .Net Core you’ll hit a"compatibility wall" trying to make it work. So how can we use .Net Core to Create Azure Blob Storage SAS Keys? Add the System.Security.Cryptography.Algorithms dependency # Add the following dependency in your project.json file
Deal with time dependencies in Tests
·493 words·3 mins
dotnet unit tests xunit
Las week we discovered that some of our test would"randomly" fail depending of the time of the day. After investigating the issue we found that the culprit was that the service being tested was taking decisions based on the current system time (DateTime.Now) leading to different outcomes through the day. So how do we deal with time dependencies in tests?
Step by step: ASP.NET Core on Docker
·287 words·2 mins
azure dotnet aspnetcore docker
This week I have to give an introductory talk on DevOps and Docker and therefore I decided to prepare a simple Step by step: ASP.NET Core on Docker sample. Assuming you have Docker installed and running, follow these 4 simple steps: Create a dockerfile # On your Docker box create a dockerfile with the following contents
Step by step: Serilog with ASP.NET Core
·256 words·2 mins
dotnet aspnetcore
NOTE: This post is out of date. Please read: Updated Step by step: Serilog with ASP.NET Core for an update. # Last week I wrote about .NET Core and Microsoft Bot Framework and I’m still learning and playing with it. The thing is that once I implemented more features and deployed the bot to Azure it didn’t work. So I had to find a way to log and trace what was happening in order to diagnose and fix the problem.
.NET Core and Microsoft Bot Framework
·782 words·4 mins
dotnet aspnetcore bot framewok
Today I’ll show you how to create a simple Skype bot that will reply with the same text message you send to it. You’ll be using .Net Core and Microsoft Bot Framework. As you already know not every library has been ported to .Net Core so you’ll have to use the Microsoft Bot Connector API – v3.0 to bring the bot to life.
Create vCard QR Codes using Azure Functions
·550 words·3 mins
azure dotnet azure functions serverless
Today I’ll show you how to develop a Web API to Create vCard QR Codes using Azure Functions. But wait what are Azure Functions? As defined by Microsoft: Azure Functions is a serverless event driven experience that extends the existing Azure App Service platform. These nano-services can scale based on demand and you pay only for the resources you consume.
Detect and Blur Faces with .NET Core and Face API
·726 words·4 mins
azure dotnet cognitive services
Today I’ll show you how to create a small console application that will Detect and Blur Faces with .NET Core and Face API. First be aware of the following prerequisites: **OS** **Prerequisites** Windows Windows: You must have .NET Core SDK for Windows or both Visual Studio 2015 Update 3* and .NET Core 1.0 for Visual Studio installed. linux, mac or docker checkout .NET Core You will also need an Azure Cognitive Services Face API account and the correct set of access keys. (Start here: Subscribe in seconds if you need a Cognitive Service Account and here for the Documentation)
Step by step: Entity Framework Core and Shadow Properties
·967 words·5 mins
dotnet entity framework
Today I’ll show you how to create a small console application with a Step by step: Entity Framework Core and Shadow Properties example. We’ll be modifying the code from my previous post: Step by step: .NET Core and Entity Framework Core to make the Student entity auditable without creating public/protected properties or private fields to hold the typical audit info (CreatedBy, CreatedAt, UpdatedBy and UpdatedAt) database fields.
Step by step: .NET Core, Azure Service Bus and AMQP
·729 words·4 mins
azure dotnet service bus
Today I’ll show you how to create a small console application with a Step by step: .NET Core, Azure Service Bus and AMQP example. First be aware of the following prerequisites: **OS** **Prerequisites** Windows Windows: You must have .NET Core SDK for Windows or both Visual Studio 2015 Update 3* and .NET Core 1.0 for Visual Studio installed. linux, mac or docker checkout .NET Core You will also need an Azure Service Bus namespace, topic and subscription with the correct set of credentials. (Start here: How to use Service Bus topics and subscriptions if you don’t know how to configure the Service Bus)
Step by step: .NET Core and Entity Framework Core
·524 words·3 mins
dotnet entity framework
Today I’ll show you how to create a small console application with a Step by step: .NET Core and Entity Framework Core example. First be aware of the following prerequisites: **OS** **Prerequisites** Windows Windows: You must have .NET Core SDK for Windows or both Visual Studio 2015 Update 3* and .NET Core 1.0 for Visual Studio installed. linux, mac or docker checkout .NET Core Now let’s start:
Add Swagger to your .NET Core Web API
·195 words·1 min
dotnet aspnetcore swagger
Last week .NET Core was released, and the first thing I tried to solve was how to Add Swagger to your .NET Core Web API: Dependencies # At the time of writing you should add the following dependency to your project.json file
Remove RavenDb's API from Swagger
·156 words·1 min
dotnet aspnetcore swagger
I’ve been working on a small IoT project where we expose a simple REST API and use RavenDB Embedded as the database. Once we enabled Swagger on our project we noticed that the generated documentation was not only showing our API but those exposed by RavenDB too. So the question came up: how can we Remove RavenDb’s API from Swagger Documentation?
NHInsights an OracleManagedDataClientDriver for NHibernate and Application Insights
·238 words·2 mins
azure dotnet application insights nhibernate oracle
Let’s talk about NHInsights an OracleManagedDataClientDriver for NHibernate and Application Insights If you use Oracle and NHibernate and you are trying to use Application Insights to diagnose issues with your database calls you will notice that for ASP.NET applications the out-of-the-box dependency monitor currently reports calls to these types of dependencies:
Cloud Design Patterns: Prepara tu aplicación para Azure
·94 words·1 min
azure dotnet cloud global azure
En esta sesión: Cloud Design Patterns: Prepara tu aplicación para Azure discutiremos los beneficios de aplicar patrones en el desarrollo de aplicaciones para la nube y los problemas que estos intentan resolver: disponibilidad, escalabilidad, resiliencia, seguridad, etc.. Esta es la agenda: Design for the Cloud Problem Areas in the Cloud Availability