CommonNetFuncs.SubsetModelBinder
4.0.17
dotnet add package CommonNetFuncs.SubsetModelBinder --version 4.0.17
NuGet\Install-Package CommonNetFuncs.SubsetModelBinder -Version 4.0.17
<PackageReference Include="CommonNetFuncs.SubsetModelBinder" Version="4.0.17" />
<PackageVersion Include="CommonNetFuncs.SubsetModelBinder" Version="4.0.17" />
<PackageReference Include="CommonNetFuncs.SubsetModelBinder" />
paket add CommonNetFuncs.SubsetModelBinder --version 4.0.17
#r "nuget: CommonNetFuncs.SubsetModelBinder, 4.0.17"
#:package CommonNetFuncs.SubsetModelBinder@4.0.17
#addin nuget:?package=CommonNetFuncs.SubsetModelBinder&version=4.0.17
#tool nuget:?package=CommonNetFuncs.SubsetModelBinder&version=4.0.17
CommonNetFuncs.SubsetModelBinder
This project provides an attribute that forces a class to only contain properties that are also present in a in another parent class. This is useful for model binding scenarios where you want to restrict the properties that can be bound to a model without causing mapping issues when binding the subset model to the parent model (using FastMap for instance)
Contents
<details> <summary><h3>Usage Example</h3></summary>
public class Person
{
public int Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
}
// This class will only allow properties that are also present in the Person class with the same name and optionally same type (type can be optionally be different)
[SubsetOf(typeof(Person))]
public class PersonSubset
{
public int Id { get; set; }
public string Name { get; set; }
}
[SubsetOf(typeof(Person))]
public class InvalidPersonSubset
{
public int Id { get; set; }
public string Name { get; set; }
public string Mail { get; set; } // Throws compiler error because 'Mail' is not a property of the Person class
}
</details>
Installation
Install via NuGet:
dotnet add package CommonNetFuncs.SubsetModelBinder
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- CommonNetFuncs.SubsetModelBinder.Attribute (>= 4.0.17)
- CommonNetFuncs.SubsetModelBinder.Generator (>= 4.0.17)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.17 | 95 | 2/23/2026 |
| 4.0.15 | 98 | 2/8/2026 |
| 4.0.14 | 96 | 2/7/2026 |
| 4.0.12 | 89 | 2/3/2026 |
| 4.0.10 | 99 | 1/24/2026 |
| 4.0.9 | 110 | 1/12/2026 |
| 4.0.6 | 107 | 1/2/2026 |
| 4.0.3 | 188 | 12/22/2025 |
| 4.0.2 | 688 | 12/2/2025 |
| 4.0.1 | 206 | 11/27/2025 |
| 4.0.0 | 273 | 11/23/2025 |
| 3.8.42 | 58 | 3/5/2026 |
| 3.8.38 | 84 | 2/24/2026 |
| 3.8.33 | 94 | 2/2/2026 |
| 3.8.32 | 90 | 2/2/2026 |
| 3.8.28 | 96 | 1/5/2026 |
| 3.8.20 | 583 | 12/1/2025 |
| 3.8.18 | 421 | 11/20/2025 |
| 3.8.16 | 412 | 11/17/2025 |
| 3.8.13 | 292 | 11/10/2025 |