Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #549 Add option to generate a PK guid value in the entity class #550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ArnaudB88
Copy link

@ArnaudB88 ArnaudB88 commented Mar 22, 2024

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add an option to generate a Guid primary key value on the entity class
1 participant