你的位置: 首页 / 资讯列表 / 分类资讯

最新.NET/.NET Core/Web开发资讯源


1 热度

Generate ASP.NET Core OpenAPI Spec At Build Time

This post will see how to configure Swashbuckle within an ASP.NET Core project to generate a static OpenAPI specification file using the CLI tooling.

收录时间: 2021-10-27
分类: ASP.NET Core
贡献者: Rector
4 热度

.NET 5.0 - Connect to MySQL Database with Entity Framework Core

In this post we'll go through the steps to connect a .NET API to MySQL using Entity Framework Core, and to create a MySQL database from code using EF Core migrations. We'll start with an example .NET CRUD API from a tutorial I posted recently, it uses an EF Core InMemory database by default for testing, we'll update it to connect to a MySQL database and run EF Core migrations to auto generate the database and tables from code. For full details about the .NET CRUD API see .NET 5.0 - CRUD API Example and Tutorial.

收录时间: 2021-10-27
分类: .NET 5
贡献者: Rector
3 热度

.Net Core中使用ElasticSearch(一)

在官网下载Es,注意版本号,不同大版本号之间差异很大。我安装的是7.14.0版本1.1 安装成服务cmd 进入bin目录下执行elasticsearch-service.bat install1.2 安装插件ik分词器,分词器的版本和ES版本需要一致elasticsearch-plugin.bat install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.14.0/elasticsearch-analysis-ik-7.14.0.zip1.3 配置账号密码修改config目录下面的...

收录时间: 2021-10-27
分类: .NET Core
贡献者: Rector
1 热度

Analyzers for ASP.NET Core in .NET 6: Exploring .NET Core 6 - Part 7

Analyzers have been built into the C# compiler for some time now. Anyone can write their own analyzer, distribute it as a NuGet package, and hook into the compiler to find potential code issues. In this post I look at the changes to the existing ASP.NET Core analyzers in .NET 6, as well as the new ones added for the new minimal APIs. This post ended up a little long, so I've included shortcuts to each of the analyzers I describe in case you want to skip ahead...

收录时间: 2021-10-27
分类: .NET Core
贡献者: Rector
1 热度

Cache strategies in Redis

Redis is an in-memory NoSQL data store. Memory is faster than disk, but there are still ways to improve performance. In this article, Camilo Reyes compares caching strategies.

收录时间: 2021-10-27
分类: Redis
贡献者: Rector
13 热度

C# Records – The good, bad & ugly

C# Records have been out for a while now and I purposely avoided jumping on the band wagon as all the other bloggers out there in proclaiming how amazing they are. In my opinion, C# Records have been out just long enough for developers to start using them and unfortunately also misusing them. I am encountering a number of situations where Records are being used and it makes no sense why and none of the functionality they provide is being used.

收录时间: 2021-10-26
分类: C#
贡献者: Rector
AD 友情赞助
14 热度

Google Sheets API with .NET Core

In this article, we’re going to explore the Google Sheets API using the Google Sheets Client Library for .NET. We’ll start with configuring the Google Sheets API in the Google developer console. Then we’ll build an ASP.NET Core application that can read and write data into a google sheet. To downloa...

收录时间: 2021-10-26
分类: .NET Core
贡献者: Rector
15 热度

Parallel.ForEachAsync in .NET 6

Great tweet from Oleg Kyrylchuk (follow him!) showing how cool Parallel.ForEachAsync is in .NET 6. It's new! Let's look at this clean bit of code in .NET 6 that calls the public GitHub API and retrieves n number of names and bios, given a list of GitHub users

收录时间: 2021-10-26
分类: .NET 6
贡献者: Rector
27 热度

ASP.NET Core updates in .NET 6 Release Candidate 2

.NET 6 Release Candidate 2 (RC2) is now available. .NET 6 RC2 is very close to the final build of .NET 6 that we expect to ship in November this year in time for .NET Conf 2021. It’s also a “go live” release, so you’re welcome to use it in production. .NET 6 RC2 primarily contains quality improvements and bug fixes, although it does also include a few new features as well.

收录时间: 2021-10-23
分类: .NET 6
贡献者: Rector
36 热度

C# 10.0: Extended Property Patterns – Use the Dot Token to Access Nested Members

In this blog post, let’s look at another interesting feature of C# 10.0 which is called extended property patterns. I’ve written a bigger blog post about pattern matching in C# 9.0. If you’re not familiar with pattern matching, I recommend you to read that blog post.

收录时间: 2021-10-22
分类: C#
贡献者: Rector
30 热度

Exploring C# 10: Global Using Declarations

Welcome back to my series on new C# 10 features. I kicked off this series by writing about file-scoped namespaces, a simple but powerful way to remove unnecessary verbosity from your C# code. This time, we're talking about a new feature that achieves similar goals: global using declarations.

收录时间: 2021-10-22
分类: C#
贡献者: Rector
33 热度

IIS - The Process Cannot Access the File Because it is Being Used by Another Process

Recently I had some issues with running a local IIS server/website on my local development machine. The solution was fairly well documented, but the surprising culprit and the fact that it had never happened to me before (despite it being a replicable process) made it worthwhile documenting.

收录时间: 2021-10-22
分类: .NET
贡献者: Rector
39 热度

vscode.dev Visual Studio Code for the Web

Back in 2019, when the .dev top-level domain opened, we picked up vscode.dev and quickly parked it, pointing at our website code.visualstudio.com (or, if you are from the Boston area like me, we "pahked it"). Like a lot of people who buy a .dev domain, we had no idea what we were going to do with it. And we certainly didn't anticipate that it would end up being the fulfillment of a mission over a decade in the making.

收录时间: 2021-10-22
分类: VS Code
贡献者: Rector
34 热度

Building and consuming GraphQL API in ASP.NET Core 5

GraphQL is a platform-independent, language-neutral query language and may be used to run queries and retrieve data. Joydip Kanjilal explains how to use GaphQI in an ASP.NET Core 5 app.

收录时间: 2021-10-21
分类: ASP.NET Core
贡献者: Rector
33 热度

Bulk Import Records Into SQLite With C#

I’ve grown fond of SQLite during my time as a developer advocate. The file-based database with native drivers for every operating system allows me to ship self-contained data-driven sample apps to developers worldwide. Developers can clone a demo and run it immediately without the need for additional dependencies like a database server, Docker container, or remote hosting environment. It’s excellent, and I’m sure my readers appreciate it.

收录时间: 2021-10-20
分类: SQLite
贡献者: Rector
AD 友情赞助
30 热度

Supporting integration tests with WebApplicationFactory in .NET 6: Exploring .NET Core 6 - Part 6

In the previous post I described the workaround that was added in .NET 6 so that the EF Core tools, which previously relied on the existence of specific methods like CreateHostBuilder would continue to work with the new minimal hosting APIs. In this post I look at a related change to ensure that integration testing with WebApplicationFactory works in .NET 6. WebApplicationFactory used the same HostFactoryResolver class as the EF Core tools, but it required a few more changes too, which I'll look at in this post.

收录时间: 2021-10-20
分类: .NET
贡献者: Rector
37 热度

IAsyncEnumerable with yield in C#

The support for Async Streams was one of the most exciting features that came out with .NET Core 3.0 and C# 8. This is possible with the use of IAsyncEnumerable with the yield operator. In this article, we are going to explore how to take advantage of this new feature to improve our code.

收录时间: 2021-10-19
分类: C#
贡献者: Rector
38 热度

Bite-Size .NET 6 - LINQ OrDefault() Overloads

A nice new overload is coming to LINQ's OrDefault methods (e.g. FirstOrDefault()), so let's check it out! In prior versions of .NET, we could use methods such as FirstOrDefault() to specify that we wanted the first element in a collection, or the default value of the element's...

收录时间: 2021-10-19
分类: .NET
贡献者: Rector
56 热度

Bite-Size .NET 6 - Chunk() in LINQ

Here's the next topic in our ongoing Bite-Sized .NET 6 series: the ability to split collections into groups of smaller collections using LINQ's Chunk() method!

收录时间: 2021-10-15
分类: .NET 6
贡献者: Rector
43 热度

Join us November 8 for the Launch of Visual Studio 2022

On behalf of our entire team, I’m excited to announce the upcoming release of Visual Studio 2022 on November 8, and the immediate availability of the Visual Studio 2022 Release Candidate (RC) and Preview 5. We invite you to explore the latest capabilities of Visual Studio 2022 at our virtual launch event on November 8. Throughout the day, you can learn from some special guest speakers, talk back to the Visual Studio team, and even download exclusive digital swag.

收录时间: 2021-10-13
分类: Visual Studio
贡献者: Rector
AD 友情赞助