mirror of https://github.com/abpframework/abp.git
committed by
GitHub
3 changed files with 31 additions and 1 deletions
@ -0,0 +1,25 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Volo.Abp.Domain.Values; |
||||
|
|
||||
|
public class EmailAddress : ValueObject |
||||
|
{ |
||||
|
public string Email { get; } |
||||
|
|
||||
|
private EmailAddress() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public EmailAddress(string email) |
||||
|
{ |
||||
|
Email = email; |
||||
|
} |
||||
|
|
||||
|
protected override IEnumerable<object> GetAtomicValues() |
||||
|
{ |
||||
|
if (Email != null) |
||||
|
{ |
||||
|
yield return Email; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue