Using MariaDB in an ASP.NET Core API with Entity Framework Core
The .NET Lab
by George Kosmidis
2y ago
MariaDB Server is one of the most popular open source relational databases. It’s made by the original developers of MySQL and guaranteed to stay open source. It is part of most cloud offerings and the default in most Linux distributions. In this post, we will see how to use MariaDB as storage for an ASP.NET API and do simple CRUD operations with Entity Framework Core. Installing MariaDB Visit the https://downloads.mariadb.org/ and download the latest stable version. At the moment of writing this article the last stable version is 10.5.4, so I would suggest to download the MSI packaged named “m ..read more
Visit website
Code Snippet: How to upload an image with FTPS in ASP.NET Core
The .NET Lab
by George Kosmidis
2y ago
This post is contains sample on how to upload an image with FTPS in ASP.NET Core. It also contains a cheat sheet of all the properties and methods of an instance of an FtpWebRequest object, mostly as a quick reference guide. The sample! I know it is usually the other way around, but I kind of feel this is the most important part of this post! If you want to learn more about all the properties and methods of an instance of FtpWebRequest, keep scrolling! Properties of an instance of an FtpWebRequest object. The following is a table containing all properties of an instance of an FtpWebRequest obj ..read more
Visit website
Swagger in ASP.NET Core: Tips & Tricks
The .NET Lab
by George Kosmidis
2y ago
This post contains a few tips and tricks that can help you transform your swagger UI into an interactive documentation. If you don’t yet know how to install swagger in ASP.NET Core, this post will help you Get started with Swagger and ASP.NET Core. How to change the URL of the Swagger UI By default, the Swagger UI can be found at http://localhost:/swagger. To change the path and set, for example, the Swagger UI at the app’s root, use: How to revert Swagger JSON to version 2.0 By default, Swashbuckle generates and exposes Swagger JSON in version 3.0 of the specification -officially called the O ..read more
Visit website
Get started with Swagger and ASP.NET Core
The .NET Lab
by George Kosmidis
2y ago
This post is an overview of how to install and configure Swagger for .NET Core. If you are searching for tips & tricks, you might be interested in the article: Swagger in .NET Core: Tips & Tricks. What is Swagger Swagger is an open-source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful web services. While most users identify Swagger by the Swagger UI tool, the Swagger toolset includes support for automated documentation, code generation, and test-case generation. Some of these tools are: Swagger Editor: Swagger ..read more
Visit website
Publish a containerized .NET Core app using Docker, Azure DevOps, Azure Container Registry and Azure App Service
The .NET Lab
by George Kosmidis
2y ago
This is a guide on how to use Azure DevOps to build and then publish a docker image as an Azure App Service, using Azure Container Registry. Prerequisites This guide assumes basic knowledge in Docker and more specifically how to create a Dockerfile. This docker cheat sheet provides a ready Dockerfile with explanations, plus an easy way to create your own Dockerfile from within Visual Studio. The guide also requires an account on Azure and Azure DevOps. The code is hosted in Azure DevOps, but almost any -accessible from Azure DevOps- version control system will do. In the process that follows ..read more
Visit website
Troubleshooting “You don’t appear to have an active Azure subscription.”
The .NET Lab
by George Kosmidis
2y ago
The message can appear in any service trying to retrieve active Azure Resources either within Azure Portal or from any 3rd party consumer. As an example, it can appear while trying to create an Azure Resource Manager service connection in Azure DevOps. The reasons found so far are the following three: Check Subscription Status Browser Caching / Cookies Azure Active Directory Security Details about three possible solutions for each problem follow. 1. Subscription Status Navigate to Azure portal to check if your subscription status is active. Use the address https://portal.azure.com/#blade/Mi ..read more
Visit website
Docker cheatsheet for .NET Core
The .NET Lab
by George Kosmidis
2y ago
This is just a cheat sheet of commands and terminology for Docker and ASP.NET Core; it contains commands that you can find in the original cheat sheet, plus a Dockerfile for ASP.NET Core and a quick guide on how to created one from Visual Studio. Hopefully, both developers that are in the process of getting into the containerize world with Docker and developers that are already in but need a quick recap will find it useful. Basic terminology Term Short explanation Docker Docker is a set of platform as a service products that uses OS-level virtualization to deliver software in packages c ..read more
Visit website
C# 9.0
The .NET Lab
by George Kosmidis
2y ago
It may be that .NET 5, the one and only .NET that will clear the confusion and lead the way for the next years was probably the biggest(?) announcement of Microsoft Build 2020, but there were numerous other equally important; from the general availability of the Blazor WebAssembly, the Azure Static Web Apps and all the projects related to IoT and Artificial Intelligence, all the way to .NET MAUI (short for Multi-platform App UI), Visual Studio Codespaces,  Entity Framework Core 5, Project Tye, Azure Quantum and the multiple new features and capabilities of Azure Cosmos DB. Although there ..read more
Visit website
GIT cheat sheet
The .NET Lab
by George Kosmidis
2y ago
I know there are many cheat sheets around (here is one I like from GitHub) but I couldn’t find many that contain sequence of commands, from clone to merge and push. This is my version of a cheatsheet which I hope you will find useful. Basic commands Command Description git init repo_name Initializes a new repo locally git clone project_url Clone a project locally git checkout branch_name Checkout a branch git add . Add all changes git push Push all changes git pull Pull all changes git commit -m "completed feature" Commit all changes git checkout -b feature/branch Create a ne ..read more
Visit website
Quantum Computing basics with Q# – The superposition of a qubit
The .NET Lab
by George Kosmidis
2y ago
There are some problems so difficult, so incredibly vast, that even if every supercomputer in the world worked on the problem, it would still take longer than the lifetime of the universe to solve! The phrase above, found in Microsoft Docs, captures today’s problems with our regular computers and as a result the limitations we face in our every day lives. Numerous problems in environment, health, agriculture and many other fields have a solution lost in a vast ocean of possible answers that need to be tested one by one for correctness. Enters Quantum Computing! What is Quantum Computing Quant ..read more
Visit website

Follow The .NET Lab on FeedSpot

Continue with Google
Continue with Apple
OR