664 热度

【万字长文】使用 LSM-Tree 思想基于.Net 6.0 C# 实现 KV 数据库(案例版)

文章有点长,耐心看完应该可以懂实际原理到底是啥子。这是一个KV数据库的C#实现,目前用.NET 6.0实现的,目前算是属于雏形,骨架都已经完备,毕竟刚完工不到一星期。当然,这个其实也算是NoSQL的雏形,有助于深入了解相关数据库的内部原理概念,也有助于实际入门。适合对数据库原理以及实现感兴趣的朋友们。整体代码,大概1500行,核心代码大概500行。

收录时间: 2022-07-27
分类: .NET 6
贡献者: Rector
663 热度

Returning XML from minimal APIs in .NET 6

In this post I show how you can return an XML response from a minimal API instead of the typical JSON response. I also look at ways to reduce the overhead introduced by MemoryStream in the implementation.

收录时间: 2022-07-06
分类: .NET 6
贡献者: Rector
782 热度

The Future of Multi-Platform .NET Application Development with WinUI, Net6 and the Uno Platform

In this post, we’re actually going to use an additional template that’s available via the Uno.Extensions.Templates package. Let’s create our application and then we’ll walk through what’s created by the template and how you can use it to jump start your next Uno Platform application.

收录时间: 2022-06-21
分类: .NET 6
贡献者: Rector
1103 热度

翻译:使用 CoreWCF 升级 WCF 服务到 .NET 6

大约在 3 年之前,我发布过一篇将一个 WPF 应用迁移到 .NET Core 3 演练过程的博客。这是一个被称为 Bean Trader 的简单商用交易示例程序。当时,我只能迁移示例解决方案的一部分。这个 Bean Trader 解决方案包括一个 WPF 客户端应用和一个客户端用来发布和接受交易的服务器端应用。客户端与服务器端的通讯使用 WCF。因为 .NET Core 3 ( 以及后继版本如 .NET 5 和 .NET 6 ) 支持客户端的 WCF API,但是不支持服务器端,我只能迁移 Bear Trader 的客户端部分,而遗留下服务器端继续运行在 .NET Framework 上。由于近期 CoreWCF 1.0 发布了,我期待完成将 Bean Trader 升级到 .NET 6 上!

收录时间: 2022-05-10
分类: .NET 6
贡献者: Rector
1313 热度

.NET 6上的WebView2体验

上次说为了不想在web端登录博客园,我想着还是继续使用MarkWord编写博客,不过在使用的过程中,如果markdown文件的目录中有中文的话,Markdown预览就不能够显示粘贴的图片了,原因是之前.NET Framework的WeBrowser库太老了,应该升级一下。替换WebBrowser的方案很多,在Stackoverflow上有人推荐使用WebView2,我就直接用了,也没有多想,实际上使用的问题还是不少的,简单记录一下。

收录时间: 2022-04-28
分类: .NET 6
贡献者: Rector
1044 热度

.NET Core(.NET6)中gRPC使用

简单解析一下gRPC,gRPC 是一个由Google开源的,跨语言的,高性能的远程过程调用(RPC)框架。特点:跨语言内容protobuf格式(比json体积小),网络传输快使用HTTP/2进行传输适合高性能轻量的微服务,一般对外的接口用restful api,内部服务的调用用gRPC。gRPC是一个分布式服务框架,和以前的WebService,WCF类似。

收录时间: 2022-04-15
分类: .NET 6
贡献者: Rector
AD 友情赞助
1027 热度

Returning HTTP 204 (No Content) from .NET Minimal API

I recently converted some ASP.NET web api projects from using controllers to using minimal apis. And I ran into a weirdness. If you return "null" from a controller method, then the response is HTTP 204 (No Content), but if you return "null" from a minimal api, the response is HTTP 200 (OK) with the string "null" as the body.

收录时间: 2022-04-15
分类: .NET 6
贡献者: Rector
781 热度

Middleware in .NET 6 - Conditionally Adding Middleware to the Pipeline

This is Part 4 of a four-part series. You might want to read Part 1, Part 2, and Part 3first. Welcome back! So far in this series, we've covered the basics of Middleware in .NET 6 applications, shown how to create custom Middleware classes, and discussed why the order of operations of the Middleware ...

收录时间: 2022-04-07
分类: .NET 6
贡献者: Rector
786 热度

What’s up with TimeZoneInfo on .NET 6? (Part 2)

In part 1, we ended up with a lot of test data specified in a text file, but without working tests – and with a conundrum as to how we’d test the .NET Core 3.1 data which requires additional information about the “hidden” AdjustmentRule.BaseUtcOffsetDelta property.

收录时间: 2022-03-29
分类: .NET 6
贡献者: Rector
695 热度

Middleware in .NET 6 - Order of Operations

This post is Part 3 of a four-part series. You might want to read Part 1 and Part 2 first. Let's continue our series on Middleware in .NET 6 by discussing the pipeline created by Middleware, and specifically why the order in which the middleware are added to the pipeline is very important.

收录时间: 2022-03-29
分类: .NET 6
贡献者: Rector
1257 热度

Creating a Windows Service with .NET 6

Windows services are programs that are automatically started when the system starts up, or when the user logs in. They run in the background and can run with a different account than the logged-in user. .NET makes it easy to create Windows services or Linux daemons as shown in this article.

收录时间: 2022-03-23
分类: .NET 6
贡献者: Rector
857 热度

Middleware in .NET 6 - Custom Middleware Classes

This post is part 2 of a four-part series. You might want to read Part 1 first. In the last post, we talked about what Middleware is, what it's for, and simple ways of including it in our ASP.NET 6 app's pipeline.

收录时间: 2022-03-22
分类: .NET 6
贡献者: Rector
781 热度

How to Build .NET Minimal APIs

How to Build .NET Minimal APIs. The release of .net 6 came with a with of minimal api’s which enable the development of small and functional single file Web API’s.What is a minimal apiMinimal API is an application model for building lightweight Web APIs...

收录时间: 2022-03-21
分类: .NET 6
贡献者: Rector
1060 热度

A deep-dive into the new Task.WaitAsync() API in .NET 6

In this post I look at how the new Task.WaitAsync() API is implemented in .NET 6, looking at the internal types used to implement it.

收录时间: 2022-03-16
分类: .NET 6
贡献者: Rector
888 热度

Middleware in .NET 6 - Intro and Basics

Welcome, dear readers, to a brand new series about middleware in .NET 6! We're going to talk about what middleware is, what it does, why we use it, and demo several implementations of various kinds of middleware. We'll also talk about the pipeline that middleware exists in, how to create it, and why the order of operations in that pipeline matters. Finally, we'll even show two ways to conditionally execute middleware in the pipeline to give you a finer-grain control of what your app does.

收录时间: 2022-03-16
分类: .NET 6
贡献者: Rector
AD 友情赞助
1159 热度

Cancelling await calls in .NET 6 with Task.WaitAsync()

In this post I discuss the new Task.WaitAsync() APIs introduced in .NET 6, how you can use them to "cancel" an await call, and how they can replace other approaches you may be using currently.

收录时间: 2022-03-09
分类: .NET 6
贡献者: Rector
982 热度

Minimal APIs in .NET 6

In this article, we are going to explain the core idea and basic concepts of the minimal APIs in .NET 6. But if we try to explain it in one sentence, it will be that it is an API without the need for a controller. Other than a theoretical explanation, we are going to dive into the code and show how we can implement a minimal API that has all CRUD operations.

收录时间: 2022-03-03
分类: .NET 6
贡献者: Rector
924 热度

What’s up with TimeZoneInfo on .NET 6? (Part 1)

.NET 6 was released in November 2021, and includes two new types which are of interest to date/time folks: DateOnly and TimeOnly. (Please don’t add comments saying you don’t like the names.) We want to support these types in Noda Time, with conversions between DateOnly and LocalDate, and TimeOnly and LocalTime. To do so, we’ll need a .NET-6-specific target.

收录时间: 2022-02-18
分类: .NET 6
贡献者: Rector
1167 热度

.Net 6 WebApplicationBuilder and Lamar

The latest Lamar V8.0.1 release has some bug fixes and mild breaking changes around the .Net Core DI integration that eliminates user reported problems with the new .Net 6 bootstrapping.

收录时间: 2022-02-15
分类: .NET 6
贡献者: Rector
781 热度

Polly with .NET 6, Part 1 - Dependency Injection of Policy to Controller

If you are using .NET 6 with the traditional Startup.cs and Program.cs, you don’t need to change anything about how you are using Polly. It all works the same.

收录时间: 2022-02-11
分类: .NET 6
贡献者: Rector
AD 友情赞助