Atulin.AutoDbSet
1.0.0
dotnet add package Atulin.AutoDbSet --version 1.0.0
NuGet\Install-Package Atulin.AutoDbSet -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Atulin.AutoDbSet" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Atulin.AutoDbSet --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Atulin.AutoDbSet, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Atulin.AutoDbSet as a Cake Addin #addin nuget:?package=Atulin.AutoDbSet&version=1.0.0 // Install Atulin.AutoDbSet as a Cake Tool #tool nuget:?package=Atulin.AutoDbSet&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AutoDbSet
Automagically add DbSet<T>
s to your DbContext
Usage
Place [AutoDbSet]
attribute on the database models you want to register...
using AutoDbSetGenerators;
namespace AutoDbSet.Demo;
[AutoDbSet]
public class Person
{
public required string Name { get; set; }
public required DateOnly Birthday { get; set; }
public required float Height { get; set; }
}
Place [AutoDbContext]
attribute on your DbContext
and make it partial
...
using AutoDbSetGenerators;
using Microsoft.EntityFrameworkCore;
namespace AutoDbSet.Demo;
[AutoDbContext]
public partial class MyCoolDbContext : DbContext
{
}
And watch the magic happen!
namespace AutoDbSet.Demo;
[System.Runtime.CompilerServices.CompilerGeneratedAttribute]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCode("AutoDbSet", "1.0.0.0")]
public partial class MyCoolDbContext
{
public required Microsoft.EntityFrameworkCore.DbSet<AutoDbSet.Demo.Person> Persons { get; init; }
}
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.CSharp (>= 4.8.0)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.8.0)
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 |
---|---|---|
1.0.0 | 38 | 11/27/2024 |