Dapper.FastCrud.ModelGenerator 3.0.44

Requires NuGet 3.3 or higher.

Install-Package Dapper.FastCrud.ModelGenerator -Version 3.0.44
dotnet add package Dapper.FastCrud.ModelGenerator --version 3.0.44
<PackageReference Include="Dapper.FastCrud.ModelGenerator" Version="3.0.44" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dapper.FastCrud.ModelGenerator --version 3.0.44
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Dapper.FastCrud.ModelGenerator, 3.0.44"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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.0.44

// Install Dapper.FastCrud.ModelGenerator as a Cake Tool
#tool nuget:?package=Dapper.FastCrud.ModelGenerator&version=3.0.44
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.

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
3.0.44 368 2/21/2022
2.4.1 41,607 10/27/2016
2.4.0 1,248 9/21/2016
2.3.2 2,565 1/5/2016
2.1.0 1,507 9/18/2015
2.0.0 1,210 6/1/2015