没有视频的介绍显得尤为空白仓促。所以，如果你不赶时间，看看视频先→ → 戳我看视频 ← ← 在线演示访客端：http://role.fuyue.xyz/visitor/index客服端：http://role.fuyue.xyz/什么？网速不行？流量不够？那好吧，马赛克画质动态图拿走～看到这里，相信看官你一定已经知道了这个系统的作用了。在线接客(或者可以说是为产品售前、售后以及各种人性化的服务)。这时候有人会问，你这个看起来就是一个普通的聊天功能啊，有什么好介绍的呢，为什么要重复造这个轮子呢？嗯？为什么是个好问题。→ →(其实就是头脑一发热，它。。它 。。。就出来了)。好了，言归正传，这...
In this post, we’ll see how we can get started with EF Core 5. We’ll design a schema for entertainment productions using a code-first approach, migrate an SQLite database to our schema’s current incarnation, seed our database, and run some typical LINQ queries.
The most common way to show an image in an HTML page is to use the tag to load an external resource. Another option is to use a URL that is a Base64encoded version of the image. There are some aspects worth considering:Using this approach the HTML will become larger, because it will also contain the...
Have you ever been working on some code and ran into an issue and needed to ask someone for help? Maybe you are looking for assistance on how to start your next app or perhaps you are seeking some architecture guidance? What if there were one place where you could go to get your technical questions answered by experts from Microsoft and the community? Well there is now with the launch of Microsoft Q&A for .NET!
After .NET 5.0's release a couple of weeks ago, I went through all of my personal/company .NET Core 3.1 applications and upgraded them to .NET 5.0. In the past upgrades to major versions have been pretty painful or downright torturous, but with this update to .NET 5.0 (note that 5.0 drops the Core moniker) I'm happy to say that it's been the easiest migration of any major .NET version update that I can remember.
In our Blazor WebAssembly series, we’ve already talked about Forms and Form Validation. There we learned a lot about creating and validating forms but there is still more to it. In this article, we are going to extend that topic by introducing a custom validation in Blazor WebAssembly. We are going to learn how to add custom validation attributes and use them for our model objects. Also, we are going to see how to customize our error messages and how to customize the style of the input elements on the form.
On December 17th we will hold our first office-hours-style webinar to tell you all about our support for .NET 5 and WinUI 3 Preview 3. Register now. Adding support for .NET 5 in Uno Platform creates multiple opportunities to improve performance and reduce solution complexity. With .NET 5, we can better target traditional Microsoft Windows targets, but also WebAssembly, Linux, macOS, iOS and Android.
In my most recent article, I showed how to create a custom model binder to bind an ISO 8601 string representation of a week of the year to a DateTime type in a Razor Pages application. The custom model binder leant heavily on the existing infrastructure that binds strings to simple types. Custom model binders are the correct solution if you want to bind to simple types, but if you want to bind to a complex type, the recommendation is to implement a TypeConverter according to the offical docs. But the docs don't provide an example that shows how to do that in the context of model binding. So here's one.
Today, we’ll talk about the new C# 9 feature, Records, and whether or not they can be used as DDD value objects. C# 9’s Records is a nice feature where the compiler automatically generates a whole bunch of useful boilerplate code for you. For example, for a record like this...
I've long said, as a fan of the console and text mode, that the command line is underloved. You can do accelerated 3D VR, sure, but impress me with a nice ASCII progress bar or spinner and oh my! *Chef's kiss*. Enter yet another lovely Console library in the form of Spectre.Console. You may know Patrik Svensson as the creator of the wonderful Cake build system. He is also enhancing our consoles with Spectre.Console. It even has support for Figlet! What's FIGlet you say?!? Well, it's giant fonts with ASCII, of course!
In a past blog post I wrote about a surprising change I encountered during the migration of a .NET Core 2.2 application to .NET Core 3.0. I have just migrated that same application to .NET 5 and guess what, I stumbled across another “tiny difference with big consequences”. The situation: I have a WPF desktop client that communicates with an ASP.NET Core server that in turn communicates with a small TypeScript browser application. I use Web API for accessing files and meta data, and SignalR to call remote functions.
Many websites depend heavily on e-mail: they send account confirmation e-mails, password reset e-mails, order confirmations, back-in-stock notifications and much more. Despite its importance, I often see that sending e-mail is an overlooked area when writing well maintainable and stable code. It's also often overlooked when monitoring sites and lots of code I have seen just assumes the mail server is up and running. But problems will occur; mail servers will go down, passwords do expire or get changed without updating the web site and more.
As you can imagine, it doesn’t make much sense to have a service that is registered as singleton to depend on another service that is registered as scoped, because the singleton instantiation will only happen once. Take this example
During moving one system from classic ASP.NET MVC to ASP.NET Core I faced an interesting challenge. Although access to system is based on Active Directory there is separate role management based on classic membership and roles providers. There are reasons why AD is not used for role management and I cannot change it. ASP.NET Core uses claims-based authentication and I needed to find a way to add role claims to authenticated identity. Here’s the solution.
Last time, I explained how easy it is to use C# 9 record types as strongly-typed ids. But unfortunately, we’re not quite done yet: there are a few issues to fix before our strongly-typed ids are really usable. For instance, ASP.NET Core doesn’t know how to handle them in route parameters or query string parameters. In this post, I’ll show how to address this issue.
Now that we've seen many concrete concepts that C# implements, we need to take some time to talk about a few more abstract ideas. These include expressions, lambdas, and delegates, and in this post we'll discuss each of these and show examples. Let's go!
Recently I talked about some of the new features in .NET 5.0 and preview versions of Visual Studio 16.8 and 16.9 with respect to ASP.NET Core Web API Projects. The first announcement I mentioned was the built-in support for OpenAPI and Swagger UI via Swashbuckle in the new ASP.NET Core 5 Web API Project Template, and the other announcement was a new feature introduced in Visual Studio 2019 that allows you to publish the web API to Azure API Management Services as part of the flow of publishing the ASP.NET Core Web API.