Skip to content

A suggestion about the field name #4

@jeff1992

Description

@jeff1992

` public abstract class EntityBase
{
public Guid Id { get; set; }

    public DateTime CreatedTime { get; set; }
    public DateTime? LastUpdatedTime { get; set; }

    public bool IsNew => this.Id  == Guid.Empty;

    public void NewId()
    {
        this.Id = Guid.NewGuid();
    }

    protected EntityBase()
    {
        CreatedTime = DateTime.Now;
    }
}`

CreatedTime>CreatedAt
LastUpdatedTime>UpdatedAt

If user needed, named like this:
CreatedBy
UpdatedBy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions