Skip to content

Add 'UserAudit' #3

Description

@ardalis

UserAudit describes how an entity was modified by a user at a particular time. The VO doesn't care about the action, just the user and the time. Thus, it should have two properties: By and On.

Example:

public class SomeEntity
{
public UserAudit Created {get; private set; }
}

Usage:
string createdByUserName = someEntity.Created.By;
DateTime createdAtDateTime = someEntity.Created.At;

Generics:
Make a base generic version with type params for both TUserIdentifier and TDateType.

Concrete versions can be created by end users. They might include user types of string, Guid, int and DateTypes of DateTime, DateTimeOffset, or NodaTime types.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions