Dapper.FastCrud.ModelGenerator
3.2.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
Requires NuGet 3.3 or higher.
dotnet add package Dapper.FastCrud.ModelGenerator --version 3.2.3
NuGet\Install-Package Dapper.FastCrud.ModelGenerator -Version 3.2.3
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="Dapper.FastCrud.ModelGenerator" Version="3.2.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dapper.FastCrud.ModelGenerator --version 3.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Dapper.FastCrud.ModelGenerator, 3.2.3"
#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 Dapper.FastCrud.ModelGenerator as a Cake Addin #addin nuget:?package=Dapper.FastCrud.ModelGenerator&version=3.2.3 // Install Dapper.FastCrud.ModelGenerator as a Cake Tool #tool nuget:?package=Dapper.FastCrud.ModelGenerator&version=3.2.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Entity generation using a database first approach (limited to SQL Server)
Entity generation can be performed by installing the NuGet package Dapper.FastCrud.ModelGenerator
and by creating
your own (*Config.tt
) files that use the generic template provided in this package.
Head over to the wiki section on the project website for more details.
Output Example
/// <summary>
/// Represents the 'Badges' table.
/// </summary>
[Table("Badges")]
public partial class BadgeEntity
{
/// <summary>
/// Represents the column 'Id'.
/// </summary>
[Key]
[Column(Order = 1)]
[ForeignKey(nameof(Employee))]
public virtual int Id { get; set; }
/// <summary>
/// Represents the column 'EmployeeId'.
/// </summary>
[Key]
[Column(Order = 2)]
[ForeignKey(nameof(Employee))]
public virtual Guid EmployeeId { get; set; }
/// <summary>
/// Represents the column 'Barcode'.
/// </summary>
public virtual string Barcode { get; set; }
/// <summary>
/// Represents the navigation property for the child-parent relationship involving <seealso cref="EmployeeEntity"/>
/// </summary>
public virtual EmployeeEntity Employee { get; set; }
}
Release Notes for 3.0
- [Breaking change] Support for composite primary keys.
- [Breaking change] Added support for self referenced entities.
- [Breaking change] Added support for multiple references to the same target using the InverseProperty attribute.
- [Breaking change] Better handling of columns representing reserved keywords in C#.
- Support for new csproj style projects.
- Fixed a problem preventing it from being used in VS2019 and later.
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETStandard 2.0
- System.ComponentModel.Annotations (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.