Today, we are shipping .NET 5.0 Release Candidate 1 (RC1). It is a near-final release of .NET 5.0, and the first of two RCs before the official release in November. RC1 is a “go live” release; you are supported using it in production. At this point, we’re looking for reports of any remaining critical bugs…Announcing .NET 5.0 RC 1 — .NET Blog
We are thrilled to announce the release of our new e-book: Blazor for ASP.NET Web Forms developers. This book caters specifically to ASP.NET Web Forms developers looking for guidelines. As well as strategies for migrating their existing apps to a modern, open-source, and cross-platform web framework. Blazor E-book for ASP.NET Web Forms Blazor is a…Free e-book: Blazor for ASP.NET Web Forms Developers — ASP.NET Blog
Blazor is Microsoft’s latest Single Page Application (SPA) framework, which is C# based and renders to the browser HTML DOM. Blazor comes in two flavors: server-side and client-side rendering. This article focuses on client-side rendering and explains how to use RestClient.Net to make calls to a RESTful API. Blazor WebAssembly uses C# compiled for WebAssembly (Wasm).
View original post 478 more words
This is something I wrote for an application I’m developing. This is an implementation of INotifyPropertyChanged that requires no backing fields, just call Set(value) or Get(). Internally it uses a dictionary to store the state and even reuses ChangedEventArgs
The source code can be found at:
Here is the extract from the ViewModel class that does all the heavy lifting:
Note to myself – Excellent article on the worker services in .NET Core 3:
The idea behind my open source Trackable Entities project is quite simple: track changes to an object graph as you update, add and remove items, then send those changes to a back end service where they can be saved in a single transaction. It’s an important thing to be able to do, because it’s difficult to wrap multiple round trips in a single transaction without holding locks for a long time. On the other hand, you could break up related operations into multiple transactions, but then you lose the benefit of atomicity, which enables you to roll back all the changes in a transaction should one of them fail.
To get started with Trackable Entities for Entity Framework Core, download the NuGet package and check out the project repository. You can also clone the sample applications and follow the instructions.
View original post 1,320 more words
It’s a very rare requirement, but sometimes in .NET you have to create your own primitive and make it behave as close as possible to a native CTS (common type system) type. “That shouldn’t be hard” would be your first thought, until you start considering all the scenarios in which it could be used. Continue reading “Creating your own primitive type”
Say you are developing an API where you have to use Thread.Sleep(…) since you are working with some device via a COM and you need to wait for the predefined amount of time before you can read from the device and there is no way around it. For example:
Rule in designing APIs in my head, is that you shouldn’t make something Async unless the underlying API(s) you are working with is also Async or uses BeginX EndX, continuations, i.e. something that is already asynchronous. By prematurely making something Async you are making an implementation decision for the consumer of the code. The code provided above doesn’t expose any such API.
If you’re a ReSharper user I think this can be very usefull technique in identifying bugs in your code from the very early stage
The Annotation Framework is a set of “hints” which can be applied to your code, either directly in form of Attributes or stored as an an external XML file (the ReSharper team was using the later method to enhance the .Net Framework libraries). The attributes, which I usually use, are NotNull and CanBeNull. There are some more but those two give you the greatest benefit.
To use them, add at first a reference to theJetBrains.Annotations.dll to your project. It can be found in the ReSharper installation folder (better add a copy to your project and SCM though).Then you can already start annotating your code, such as:
Pretty self-explaing, isn’t it? When trying to assign then null to the person’s name, ReSharper will give…
View original post 86 more words