public static UserDto AsDto(this UserDocument document) { return(new UserDto { Id = document.Id, CreatedAt = document.CreatedAt, Email = document.Email, Permissions = document.Permissions ?? Enumerable.Empty <string>(), Role = document.Role }); }
public static User AsEntity(this UserDocument document) { return(new User(document.Id, document.Email, document.Password, document.Role, document.CreatedAt, document.Permissions)); }