Tag: csharp
77 posts · Page 5 of 8
2023-09-28 csharpdotnet
Implementation type Data.AppDbContext can’t be converted to service type Microsoft.AspNetCore.Identity.IUserStore
Fix the ASP.NET Core Identity error where AppDbContext can't be converted to IUserStore by adding AddEntityFrameworkStores to your identity configuration.
2023-09-25 csharpdotnetdotnet-8
.NET 8 – Serializing properties from interface hierarchies
.NET 8 adds support for serializing properties from interface hierarchies, including all properties from all interfaces depending on the declared variable type.
2023-09-21 csharpdotnetdotnet-8
.NET 8 – Deserialize into non-public properties
Learn how to deserialize JSON into non-public properties in .NET 8 using the JsonInclude attribute and parameterized constructors.
2023-09-17 csharpdotnetdotnet-8
.NET 8 – How to use JsonStringEnumConverter with native AOT
Learn how to use the new JsonStringEnumConverter<TEnum> in .NET 8 for native AOT-compatible enum serialization with System.Text.Json.
2023-09-14 csharpdotnetdotnet-8
The type or namespace name InterceptsLocationAttribute could not be found
How to fix error CS0246 for InterceptsLocationAttribute in C# interceptors by defining the attribute yourself.
2023-09-11 csharpdotnetdotnet-8
.NET 8 – Mark JsonSerializerOptions as readonly
Learn how to mark JsonSerializerOptions instances as read-only in .NET 8 using MakeReadOnly, and how to check the IsReadOnly property.
2023-09-07 csharpdotnetdotnet-8
.NET 8 – Serialization of Half, Int128, and UInt128
System.Text.Json in .NET 8 adds built-in serialization support for the Half, Int128, and UInt128 numeric types.
2023-09-06 csharpdotnetdotnet-8
.NET 8 – Memory<byte> is serialized as base64
Starting with .NET 8, both Memory<byte> and ReadOnlyMemory<byte> are serialized as Base64 strings, while other types like Memory<int> remain JSON arrays.
2023-09-05 csharpdotnetdotnet-8
.NET 8 – Include non-public members in JSON serialization
Learn how to include private, protected, and internal properties in JSON serialization in .NET 8 using the JsonInclude attribute.
2023-08-31 csharp
C# 12 – Inline arrays
Inline arrays enable you to create an array of fixed size in a struct type. Such a struct, with an inline buffer, should provide performance comparable to an unsafe fixed size buffer. Inline arrays are mostly to be used by the runtime team and some library authors to improve performance in certain scenarios. You likely…