EntityFrameworkCore.Generator
EntityFrameworkCore.Generator copied to clipboard
Closes #549 Add option to generate a PK guid value in the entity class
Resolves #549 Add an option to generate a new Guid value for the primary key property in the generated entity classes.
YAML usage:
data:
entity:
generatePkValue: true
Code generation result:
using System;
using System.Collections.Generic;
namespace Company.Project.Domain.Entities;
public partial class Project
{
public Project()
{
#region Generated Constructor
Id = Guid.NewGuid();
#endregion
}
#region Generated Properties
public Guid Id { get; set; }
#endregion
}