AspNetCore.Docs
ExpressionPowerTools
Our great sponsors
AspNetCore.Docs | ExpressionPowerTools | |
---|---|---|
40 | 15 | |
12,284 | 80 | |
1.0% | - | |
9.9 | 0.0 | |
7 days ago | about 1 year ago | |
C# | C# | |
Creative Commons Attribution 4.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
AspNetCore.Docs
-
DevDocs
Certain parts of Microsoft Learn are permissive, for example the .NET BCL documentation is Creative Commons Attribution: https://github.com/dotnet/dotnet-api-docs as is ASP.NET Core: https://github.com/dotnet/AspNetCore.Docs (a good hint if documentation is permissively licensed and on GitHub is if there's an edit button at the top.)
The C# language specification is unfortunately a bit fuzzier: https://github.com/dotnet/csharplang/discussions/4855
The updated unified C# language specification is CC, but it's still catching up to modern C#: https://github.com/dotnet/csharpstandard
-
ASP.NET Core Blazor
looks like 8.0 release? https://github.com/dotnet/AspNetCore.Docs/commit/e8ce5761969...
-
Accessing the HttpContext outside the outside the HttpRequest
I am coming from .Net Framework and supporting the legacy apps to .Net Core ecosystem fairly recently, so I might have missed couple of release notes so please bear with me. In the .Net Framework usage of HttpContext outside HttpRequest was discouraged because it isn't thread safe. Now I get this feedback and then I google around a bit and I find topics like this: https://github.com/dotnet/AspNetCore.Docs/issues/18419 or like this onehttps://learn.microsoft.com/en-us/answers/questions/1143595/asp-net-core-web-api-how-to-use-user-claims-in-ser
I am not sure what you mean,but here you can find all the supported ways of accessing the httpcontext in.net core https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/http-context.md maybe this can help you
- When/why do we need to use UseActifileExceptionHandler()?
-
Migration of WebAPI project from .NET Framework 4.7.2 to .NET 6
Whilst EF6.3 had some support (note: designer doesn’t work) in .NET Core 3.1 (sample), I’m not sure if that applies to NET6. You could certainly give it a try.
-
15 Popular Github Repositories for the Modern Developer of 2023
11. ASP.NET
- SSO Between .Net Framework 4.6.1 MVC and .NET 7
- Big sites in Blazor
-
Blazor Hybrid: WPF/WinUi/MAUI?
Also this discussion https://github.com/dotnet/AspNetCore.Docs/issues/26250
ExpressionPowerTools
-
Run EF Core Queries on SQL Server From Blazor WebAssembly
During serialization, the SerializationState maintains a list of types. Unless the option is disabled, types are compressed. This means their index is swapped for their full name. Consider a list like this:
Explore the Expression Power Tools on GitHub
Expressions are extremely helpful for building APIs that infer information from strongly typed references. For example, I wrote Ensure.NotNull to validate parameters the old-fashioned, pre “nullable types” way. It’s not necessary because new keywords and attributes like CallerMemberName and nameof can resolve references at compile time, but it was a fun learning experience. Here’s the code to extract the value and name of a parameter using an expression like this: () => parameter:
How to automate the generation of useful API documentation through XML comments
How to reverse engineer the XML documentation comments bizarre key format and build an algorithm to map members to XML comments
It quickly became evident I needed a dependency injection system. Instead of taking a dependency on an external provider, I decided to implement my own. Again, this was mostly a learning experience, but I also wanted to minimize dependencies and make it more self-contained so that overriding defaults is the exception, not the null. The system allows for registering types that are implemented on the fly, and singletons. I may have made a bad decision when I chose to implement the solution as a static host, but it was the easiest way to make it globally available. The caveat is that I have to run tests in single-threaded to avoid conflicts with the services mutating as part of test runs. I am considering refactoring to allow partitions as part of Issue #20 but for now I haven’t encountered major issues outside of testing.
It should be fairly clear! The rules are all implemented in DefaultComparisonRules.cs. I’ll talk about “similarity” in a minute.
It turns out that answering the question, “are these two values equal” without context can be difficult. I settled on a “good enough” approach that looks like this (ValuesAreEquivalent in ExpressionEquivalency.cs):
It turns out that types aren’t as easy as they may seem. You can’t simply save a type name and easily recreate it. Simple types are fine, but types that have generic parameters are another story. I built a system that seems to work, but I also am spiking a different solution that shows promise. I’ll cover what’s there now in a moment. The strategy I decided to go with was to create some complementary classes to expressions that are easy to serialize. The first class is the base class for all of these building blocks: SerializableExpression. It contains just one thing: the ExpressionType. This is exactly what’s needed to construct a new expression. Some types map one-to-one, such as Constant. Other types like Add and And both belong to BinaryExpression.
The first step was to have a consistent way to parse the tree. Expression trees can be very deep and complex, so I wrote ExpressionEnumerator and related extension methods to easily parse the tree. For example, I can extract all of the constants like this:
What are some alternatives?
Nerdbank.GitVersioning - Stamp your assemblies, packages and more with a unique version generated from a single, simple version.json file and include git commit IDs for non-official builds.
Avalonia.FuncUI - Develop cross-plattform GUI Applications using F# and Avalonia!
shadowsocks-windows - A C# port of shadowsocks
TcNo-Acc-Switcher - A Super-fast account switcher for Steam, Battle.net, Epic Games, Origin, Riot, Ubisoft and many others! [Moved to: https://github.com/TCNOco/TcNo-Acc-Switcher]
openiddict-core - Flexible and versatile OAuth 2.0/OpenID Connect stack for .NET
v2rayN - A GUI client for Windows, support Xray core and v2fly core and others
Entity Framework - EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
atldotnet - Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
CliWrap - Library for running command-line processes
WPF - WPF is a .NET Core UI framework for building Windows desktop applications.
xperience-page-template-utilities - Utilities to help quickly create and register MVC Page Templates in Kentico Xperience