let today = new Beginning();

All Posts in 2020.1

Get an ideal flight simulator free based on X-Plane 11 (Free plugins)

Video: Or(China edition): Before reading this, you need to have X-Plane 11 installed. Buy X-Plane 11 here: Every time I install X-Plane 11, I gonna install many plugins to get better fly experience. And I will try to list all the plugins I use free which helps me to get perfect fly  …

X-Plane Flight simulation Flight Plugins Plane Configuration Free

Tips to get better performance for Entity Framework Core

Only get the data you need And the key reason for your slow query is it outputs too much data. Consider adding: Take(200), Skip() to take only the data you need or the current page requires. Use a pager to generate the report. This might helps a lot. Consider the following code (BAD Example) var myArticles = await _dbContext .Articles .Where(t => t.OwnerId == me.Id) .  …

Entity Framework SQL Performance Database

Scan all accessible class in C#

Getting all accessible assemblies in C# is easy. Calling GetReferencedAssemblies and you can get all you referenced assemblies. But project reference is recursive. To get all the class, you need to build a reference tree and read from the entire tree. Consider the following code: private IEnumerable<Assembly> ScanAssemblies(Assembly entry) { yield return entry;  …

C# .NET Core Reflection

Use IIS or Azure App Service as a reverse proxy

IIS is a popular web server with awesome GUI management and high performance. And sometimes we just need IIS works as a reverse proxy. Last week, I was building Aiursoft.IO. Aiursoft.IO is a project which reverse-proxies to provide a shorter download URL. And we already have a Windows Server virtual machine and Azure App Service Plan. So we don't plan to buy an  …

IIS web.config Reverse Proxy Web Azure App Service Azure

Share view component between different ASP.NET Core web project

When some logic in C# can be shared between projects, we gonna create a new class library project. But sometimes we just want to share some view components. For example, for all pages in Aiursoft, it all contains a Logout component. Writing this more than one time doesn't make sense. So how can we share it? First, we gonna create a new .NET Core class library project alongside it. Name it:  …

ASP.NET Core C# class library View component

One command to pull all git repositories

Every time I start my computer, I gonna open bash and pull all my repositories. My folder structure looks like this: So how can I pull all my repos with only one command? First, create a new file: under the folder WorkSpace Change the content to: find . -maxdepth 2 -mindepth 2 -type d ( ! -name . ) -exec bash -c "cd '{}' && pwd && git pull" ; And execute the  …

bash git