Blog Posts tagged with 'aspnet'

Set Host Environment in ASP.NET Core Using Command Line Arguments

Most articles talk about setting the host environment in ASP.NET Core using Environment Variables, but I wanted to set the host environment in an ASP.NET Core web application using command line arguments. This is actually really easy to do.

Read More

User Secrets in ASP.NET Core MVC Web Application

Learn how to store and retrieve user secrets in ASP.NET Core MVC Web Applications. This article discusses using the Secret Manager tool to add user secrets for your web application and retrieve them using ASP.NET Core Configuration. This is perfect for storing usernames and passwords for twitter, facebook, github, etc. per user outside of the project directory so they don't get pushed to your source code repository and shared with others.

Read More

Getting Started with ASP.NET Core MVC and EF Core

I walk you through developing an ASP.NET Core MVC Web Application with Entity Framework Core and SQLite using EF Core Migrations on macOS using Visual Studio Code. The application also shows how to use ASP.NET Core Dependency Injection to inject a custom DbContext into a service responsible for fetching data from SQLite.

Read More

Entity Framework Core Example Using SQLAlchemy

Taking the example code I wrote with Entity Framework Core and C# and performing the same O/R Mapping and SQL Commands using SQLAlchemy and Python to perform CRUD operation on a SQLite Database.

Read More

Getting Started with Entity Framework Core and SQLite

In this example I will create a .NET Core Console Application that uses Entity Framework Core to create a SQLite Database and perform various CRUD operations. Later I will add EF Core and SQLite to the ASP.NET Core Web API Reminder Service.

Read More

ASP.NET Core MVC Web Template

Create a new ASP.NET MVC Core Web Application using the web template to learn how to configure various environmental settings, logging, database connections, authentication, and dependency injection in ASP.NET Core MVC.

Read More

Using PyCharm's REST Client to Test ASP.NET Core Web API

I used PyCharm's REST Client to fully test the ASP.NET Core Web API Application I built on macOS using Visual Studio Code. It made sense since I was already using PyCharm to develop the Python Script that was going to consume the ASP.NET Core Web API. PyCharm is amazing and it's REST Client is simple and powerful to use.

Read More

ASP.NET Core Web API on macOS Using Visual Studio Code

In this article I create an ASP.NET Core Web API Application and Python web client on macOS that allows me to list, add, and remove daily reminders. I also show how to register services with the ASP.NET Core Dependency Injection Framework. I use Visual Studio Code to build the Web API Application and PyCharm to build the Python web client.

Read More

Python Web Client Retrieving Factorial Calculations from ASP.NET Core Website

As promised, I wrote a Python client using the Requests http library to use the factorial service I built with ASP.NET Core Routing, RouteBuilder.MapGet, and a custom RequestDelegate. I just made a small tweak to the RequestDelegate to support a custom http header for returning just the factorial instead of a formatted string.

Read More

ASP.NET Core Routing and RouteBuilder.MapGet for Calculating a Factorial

I wrote another example of using ASP.NET Core Routing. This example uses RouteBuilder.MapGet and a RequestDelegate to handle incoming requests for factorial calculations. It is similar to the ASP.NET Core Routing and fibonacci number example, except I choose not to write an implementation of IRouter.

Read More

ASP.NET Core Routing Tutorial

I am creating an ASP.NET Core Web Application on macOS using Kestrel and ASP.NET Core Routing to display a Fibonacci number upon request. I don't need ASP.NET Core MVC or Web API to do something so simple, and this will give me a better understanding of the basics of ASP.NET Core Routing.

Read More

ASP.NET Core MVC From Scratch

Step-by-step tutorial on developing an ASP.NET Core MVC Web Application with the Razor View Engine from scratch. I am not using wizards or special templates. I am building the web application from scratch starting with the dotnet CLI and adding the necessary dependencies and files along the way. This is all done on macOS using the command line and Visual Studio Code.

Read More