41 热度

使用 .NET Core 3.0 的 AssemblyLoadContext 实现插件热加载

一般情况下,一个 .NET 程序集加载到程序中以后,它的类型信息以及原生代码等数据会一直保留在内存中,.NET 运行时无法回收它们,如果我们要实现插件热加载 (例如 Razor 或 Aspx 模版的热更新) 则会造成内存泄漏。在以往,我们可以使用 .NET Framework 的 AppDomain 机制,或者使用解释器 (有一定的性能损失),或者在编译一定次数以后重启程序 (Asp.NET 的 numRecompilesBeforeAppRestart) 来避免内存泄漏。因为 .NET Core 不像 .NET Framework 一样支持动态创建与卸载 AppDomain,所以一直都没有好...

收录时间: 2019-10-09
分类: .NET Core
贡献者: Rector
43 热度

从壹开始学习NetCore 45 ║ 终于解决了事务问题

一、项目说明哈喽,又来写文章了,原来放假可以这么爽,可以学习和分享,嘘,大家要好好的工作哟。昨天发表的问题,嗯,给我留下了一点点冲击,夜里辗转反侧,想了很多,从好到坏再到好再到坏,从希望到失望再到希望再到失望,想起来当年高四了,不想解释什么了,四年后再见,不说废话,直接说说今天的内容吧。 今天这个内容,还是来源于两个多月前,我的项目的一个 issue ,当时说到了如何使用事务,(为啥要使用事务,我就不多说了,相信肯定都知道,还有那个每次面试都问的题,事务四大特性。不知道还有没有小伙伴记得,不,是都记得!)​我一直也是各种尝试,直到前几天也尝试了几个办法,还是无果,然后又和 sqlsuga...

收录时间: 2019-09-30
分类: .NET Core
贡献者: Rector
49 热度

NET Core 3.0 AutoFac替换内置DI的新姿势

.NET Core 3.0 和 以往版本不同,替换AutoFac服务的方式有了一定的变化,在尝试着升级项目的时候出现了一些问题。原来在NET Core 2.1时候,AutoFac返回一个 IServiceProvider 参数注入到ConfigureServices .NET Core 服务中,基本大痣是这样做的。首先我们需要一个重写 Autofac.Module 的方法,这将用于将我们 Register [数据访问层] 以及  Services [逻辑层] 的注册...

收录时间: 2019-09-29
分类: .NET Core
贡献者: Rector
33 热度

Lamar and Oakton join the .Net Core 3.0 Party

Like many other .Net OSS authors, I’ve been putting in some time this week making sure that various .Net tools support the brand spanking new .Net Core and ASP.Net Core 3.0 bits that were just released. First up is Oakton and Lamar, with the rest of the SW Missouri projects to follow soon.

收录时间: 2019-09-29
分类: .NET Core
贡献者: Rector
45 热度

Article Series - .NET Core 3

In this series we will explore some more if the benefits of .NET Core and how it can benefit not only traditional .NET developers but all technologists that need to bring robust, performant and economical solutions to market.o mastering property-based testing.

收录时间: 2019-09-26
分类: .NET Core
贡献者: Rector
26 热度

Creating gRPC .NET Core Client libraries

This week, .NET Core 3.0and ASP.NET Core 3.0launched and one of the headline features is the fact that we can now easily create gRPC server applications and clients to consume them.I’ve been playing with gRPC locally for a little while now and really enjoy the experience. I’ve created a new talk...

收录时间: 2019-09-25
分类: .NET Core
贡献者: Rector
AD 友情赞助
45 热度

ASP.NET Core and Blazor updates in .NET Core 3.0

Today we are thrilled to announce the release of .NET Core 3.0! .NET Core 3.0 is ready for production use, and is loaded with lots of great new features for building amazing web apps with ASP.NET Core and Blazor...

收录时间: 2019-09-24
分类: .NET Core
贡献者: Rector
687 热度

.NET Core Support and More in Visual Studio 2019 version 16.3 - Update Now!

As we continue to deliver on our mission of any developer, any app, any platform, it’s always an exciting time on the Visual Studio team when we get to launch major features. Today we’ve released Visual Studio 2019 version 16.3 which contains support for the release of .NET Core 3.0...

收录时间: 2019-09-24
分类: .NET Core
贡献者: Rector
37 热度

.NET Core 3.0 Released / .NET 5 Is VNext

This latest release of .NET Core 3.0 offers some great improvements to .NET Core. In addition to great C# 8 features (you can read about some of the top C# 8 features here), it includes many other improvements, in addition to adding Windows Forms (aka WinForms) and WPF support! There are also many performance improvements, new JSON APIs, support for ARM64, and more!

收录时间: 2019-09-24
分类: .NET Core
贡献者: Rector
33 热度

Single-file executables in .NET Core 3

The new PublishSingleFile option in .NET Core 3 lets you package an application into a single executable (.exe) file that contains all assemblies, resources, content files and other stuff that the app requires at runtime. This means that the output directory of an app that previously would contain a bunch of framework specific and referenced DLLs, configuration files and other content can now be reduced to contain only a single .exe file that you can simply double-click on to run the app. These single-file executables do however come with some gotchas.

收录时间: 2019-09-24
分类: .NET Core
贡献者: Rector
43 热度

"Implementing" a non-public interface in .NET Core with DispatchProxy

Reflection is a tremendously powerful concept in .NET, which every C# developer, sooner or later, ends up working with. It is very useful for a lot of perfectly honest scenarios such as for example assembly scanning, type discovery or all kinds of application composability features.

收录时间: 2019-09-20
分类: .NET Core
贡献者: Rector
46 热度

Build a Simple .NET Core App on Docker

Wouldn’t it be great if stuff just worked? Especially in the ever-changing world of software. Chasing dependency issues and debugging arcane operating system errors - not a good use of time.One important aspect of “stuff just works” – reliability. Recently, the software community has made strides in...

收录时间: 2019-09-20
分类: .NET Core
贡献者: Rector
55 热度

Announcing .NET Core 3.0 Release Candidate 1

Today, we’re announcing .NET Core 3.0 Release Candidate 1. Just like with Preview 9, we’ve focused on polishing .NET Core 3.0 for a final release. We are now getting very, very close. We intend to release the final version on September 23 at .NET Conf.

收录时间: 2019-09-17
分类: .NET Core
贡献者: Rector
59 热度

.NET Core Opinion 14 - Razor Pages for HTML, Controllers for APIs

.NET Core opinions are returning from a summer holiday in time to brave the melancholia of autumn. ASP.NET Core 2.0 introduced Razor Pages, which I believe are superior to the MVC framework when building HTML applications with .NET Core.Razor Pages encourage a separation of concerns in presentation l...

收录时间: 2019-09-13
分类: .NET Core
贡献者: Rector
103 热度

.NET Core September 2019 Updates - 2.1.13 and 2.2.7

Today, we are releasing the .NET Core September 2019 Update. These updates contain security and reliability fixes. See the individual release notes for details on updated packages.

收录时间: 2019-09-11
分类: .NET Core
贡献者: Rector
AD 友情赞助
55 热度

使用Elastic APM监控你的.NET Core应用

本文所准备介绍的Elastic APM是一套用于监控应用各项指标,比如系统响应时间、异常、EF执行的SQL记录等等,并且可以将这些记录组织成一个可追溯的链路,方便查询问题。此外,Elastic APM还可以通过Kibana来做非常漂亮的可视化展示,方便我们定位和发现问题。

收录时间: 2019-09-10
分类: .NET Core
贡献者: Rector
58 热度

net core天马行空系列: 一个接口多个实现类,利用mixin技术通过自定义服务名,实现精准属性注入

日常开发中,我们常会遇到这样的场景,一个接口,有多个实现类,在某个业务中,我们希望指定某个实现类,如今网络上常见的解决方案,就是注入一个委托或者利用工厂模式,这些方式虽然能实现功能,但使用起来还是不够优雅,如何才称得上优雅呢?自然是在添加服务的时候给服务指定名称,注入的时候根据名称来进行注入,没错,就是类似spring boot里的@Qualifier注解,那么net core能实现这个注解么?要知道net core里的原生DI并不支持在注册的时候给服务添加名称,所以实现起来也是难上加难,但是,利用动态代理,我们就能完美解决这个问题,没错,他Lei了,net core版[QualifierAttribute],实现这个注解用到的最核心的技术,就是动态代理中非常重要的mixin,什么是mixin呢...

收录时间: 2019-09-10
分类: .NET Core
贡献者: Rector
61 热度

Interacting with native libraries in .NET Core 3.0

NativeLibrary is a new class in .NET Core 3.0 for interacting with native libraries. In this article, we’ll take a closer look.

收录时间: 2019-09-10
分类: .NET Core
贡献者: Rector
48 热度

Maximising .NET Core API performance

We recently rewrote one of our APIs from scratch, Saved Items, to better pave the way for new functionality and improve the performance by utilising new technologies such as .NET Core 2.

收录时间: 2019-09-10
分类: .NET Core
贡献者: Rector
66 热度

netcore 中的动态代理与RPC实现(微服务专题)

一、关于RPC的调用 1. 调用者(客户端Client)以本地调用的方式发起调用; 2. Client stub(客户端存根)收到调用后,负责将被调用的方法名、参数等打包编码成特定格式的能进行网络传输的消息体; 3. Client stub将消息体通过网络发送给服务端; 4. Server stub ...

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