22 热度

Domain Modeling - Encapsulation

Domain Modeling - Encapsulation Date Published: 18 May 2022Domain models should encapsulate logic operations so that there is only one way to perform a given logical operation. That means avoiding exposing entity state and ensuring operations flow through specific methods. By funneling specific oper...

收录时间: 2022-05-19
分类: 架构设计
贡献者: Rector
23 热度

Copy To Clipboard in Blazor WebAssembly

In this article, we are going to learn how we can Copy to Clipboard in a Blazor WebAssembly Project.

收录时间: 2022-05-19
分类: Blazor
贡献者: Rector
22 热度

Commands & Events: What’s the difference?

One of the building blocks of messaging is, you guessed it, messages! But there are different kinds of messages: Commands and Events. So what’s the difference? Well, they have very distinct purposes, usage, naming, ownership, and more!

收录时间: 2022-05-19
分类: 架构设计
贡献者: Rector
32 热度

Central Package Management for .NET Projects

Nowadays, every non-trivial software project depends on a number of external dependencies. Good software design is all about modularity, and that’s one of the reasons behind NuGet’s success in the .NET world. NuGet is the famous, well-integrated package manager for .NET with hundreds of thousands of public packages. Modern .NET projects utilize NuGet packages a lot, and the tool just got better. The NuGet team has just released the central package management feature.

收录时间: 2022-05-18
分类: .NET
贡献者: Rector
28 热度

What’s new with ML.NET Automated ML (AutoML) and tooling

ML.NET is an open-source, cross-platform machine learning framework for .NET developers that enables integration of custom machine learning into .NET apps. We are excited to update you on what we’ve been working on over the past few months.

收录时间: 2022-05-18
分类: 机器学习
贡献者: Rector
29 热度

Using MySQL in a Docker container with EF Core

Recently I’ve been asked for a sample using EF Core with MySQL. When using EF Core I’m using Micorosft SQL Server or Azure Cosmos DB – and you have many code samples for EF Core in my book Professional C# and .NET, 2021 Edition. To demonstrate using EF Core I took one of the existing samples and changed the SQL Server provider to a MySQL provider. For not needing to install MySQL on my system, I’m using a Docker image as you can read here...

收录时间: 2022-05-18
分类: .NET Core
贡献者: Rector
AD 友情赞助
33 热度

Implementing API Gateway with Ocelot in ASP.NET Core

In this article, we are going to learn how to implement an API Gateway using Ocelot. Ocelot is an open-source API Gateway, designed for microservices architecture. We already have an article about API Gateway, where we explained a lot about this subject. So, if you are not that familiar with the topic and microservices overall, we strongly suggest reading the linked article first.

收录时间: 2022-05-17
分类: ASP.NET Core
贡献者: Rector
34 热度

Raw String Literals In C# 11 - .NET Core Tutorials

Recently I was trying to write a unit test that required me to paste in some known JSON to validate against. Sure, I could load the JSON from a file, but I really don’t like File IO in unit tests. What it ended up looking like was something similar to...

收录时间: 2022-05-16
分类: C#
贡献者: Rector
38 热度

Microsoft .NET 7 Preview 4 brings Regex improvements, cache metrics

Fourth preview of the forthcoming .NET upgrade adds span support to the Regex library and hit and miss stats for IMemoryCache.

收录时间: 2022-05-16
分类: .NET
贡献者: Rector
50 热度

WinUI迁移到即将"过时"的.NET MAUI个人体验

本人平时是做.net相关的工作,对于.net技术栈也有一些了解,自从新的.net能够跨平台之后,之前也有跨平台的ui框架Xamarin,现在微软推出了.NET MAUI这个说是 统一了开发体验,而且都RC版本了,所以本人也就想着试试看了,于是就想着把前几天的WinUI的demo迁移到MAUI上试试看了。

收录时间: 2022-05-16
分类: .NET
贡献者: Rector
32 热度

Asp.Net Core 7 preview 4 重磅新特性--限流中间件

限流是应对流量暴增或某些用户恶意攻击等场景的重要手段之一,然而微软官方从未支持这一重要特性,AspNetCoreRateLimit这一第三方库限流库一般作为首选使用,然而其配置参数过于繁多,对使用者造成较大的学习成本。令人高兴的是,在刚刚发布的.NET 7 Preview 4中开始支持限流中间件。UseRateLimiter尝鲜安装.NET 7.0 SDK(v7.0.100-preview.4)通过nuget包安装Microsoft.AspNetCore.RateLimiting创建.Net7网站应用,注册中间件全局限流并发1个app.UseRateLimiter(new RateLimi...

收录时间: 2022-05-13
分类: ASP.NET Core
贡献者: Rector
42 热度

How to Convert JSON to XML or XML to JSON in C#

In this article, we are going to learn how to convert JSON to XML and XML to JSON in C#.

收录时间: 2022-05-13
分类: C#
贡献者: Rector
51 热度

Announcing gRPC JSON transcoding for .NET

gRPC is a modern way to communicate between apps. gRPC uses HTTP/2, streaming, binary serialization, and message contracts to create high-performance, real-time services. .NET has excellent support for building gRPC apps.

收录时间: 2022-05-13
分类: .NET
贡献者: Rector
59 热度

.NET MAUI 候选版本 3 已发布

NET MAUI (多平台应用程序 UI)候选版本 3 已发布!其中包含一批新的改进,比如使用 shell 控件实现导航。与以前的候选版本一样,RC3 包含在 “上线” 支持政策中,这意味着微软为开发者的生产级应用程序提供 .NET MAUI 支持。

收录时间: 2022-05-12
分类: .NET
贡献者: Rector
91 热度

.NET 7 Preview 4 发布

.NET 7 发布了第 4 个预览版。重要变化一览:增强 OpenTelemetry 的 .NET 实现的可观测性;为日期和时间结构体增加微秒和纳秒属性;为缓存扩展(caching extensions)引入新指标;提升“On Stack Replacement”性能;增加新的 tar API;优化 .NET 7 中正则表达式的性能;增加功能...

收录时间: 2022-05-12
分类: .NET
贡献者: Rector
AD 友情赞助
40 热度

Using the when Keyword in C# While Handling Exceptions

In this article, we are going to learn why and how to use the when keyword within try-catch blocks while handling exceptions in C#. We cannot avoid the occurrence of exceptions in the life cycle of an application. An exception is a problem that appears unexpectedly from our codebase. Exception handling is the process of building a system that can detect and manage exceptions. Exceptions that are not handled properly can completely disrupt the flow of our application.

收录时间: 2022-05-12
分类: C#
贡献者: Rector
39 热度

Blazor和Vue对比学习(基础1.6):祖孙传值,联级和注入

前面章节,我们实现了父子组件之间的数据传递。大多数时候,我们以组件形式来构建页面的区块,会涉及到组件嵌套的问题,一层套一层。这种情况,很大概率需要将祖先的数据,传递给子孙后代去使用。我们当然可以使用父传子的方式,使用属性一级级往下传,但这样真得很麻烦。所以在Vue和Blazor都提供了祖孙传值的方案。插个话题:有人会问,子传父是不是也可以一级级往上传?当然可以,但你绝不要这么去做。子传父就已经够绕了,不要为难自己。如果有这种需求,应该考虑数据状态从组件中剥离出来,我们将在进阶章节,一起学习“状态管理”。Vue中使用provide/inject这两个API来实现祖孙传值(这个概念被翻译为依赖注入...

收录时间: 2022-05-12
分类: Blazor
贡献者: Rector
46 热度

C# 编写一个简单易用的 Windows 截屏增强工具

半年前我开源了 DreamScene2一个小而快并且功能强大的 Windows 动态桌面软件。有很多的人喜欢,这使我有了继续做开源的信心。这是我的第二个开源作品 ScreenshotEx一个简单易用的 Windows 截屏增强工具。欢迎 Star 和 Fork https://github.com/he55/ScreenshotEx前言在使用 Windows 系统的截屏快捷键 PrintScreen 截屏时,如果需要把截屏保存到文件,需要先粘贴到画图工具然后另存为文件。以前我还没有觉得很麻烦,后来使用了 macOS 系统的截屏工具,我才知道原来一个小小的截屏工具也可以这么简单易用。于是参考...

收录时间: 2022-05-12
分类: C#
贡献者: Rector
39 热度

ElasticSearch基本概念和简单CRUD

Lucene是一种高性能、可伸缩的信息搜索(IR)库,在2000年开源,最初由鼎鼎大名的Doug Cutting开发,是基于Java实现的高性能的开源项目。Lucene采用了基于倒排表的设计原理,可以非常高效地实现文本查找,在底层采用了分段的存储模式,使它在读写时几乎完全避免了锁的出现,大大提升了读写性能。

收录时间: 2022-05-12
分类: Elasticsearch
贡献者: Rector
53 热度

Testing ASP.NET Core gRPC services in JetBrains Rider

I was recently chatting to Dan Clarke for the Unhandled Exception podcast, and the topic of testing gRPC endpoints came up. Dan wondered if there was an equivalent of Postman for gRPC, and it turns out that Postman itself supports gRPC!

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