using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using webapi.Domain.SeedWork; namespace webapi.Domain.AggregatesModel.UserFlatMappingAggregate { public class RequestApprovedDate : ValueObject { public DateTime Date { get; private set; } private DateTime NullDateTime => new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); public RequestApprovedDate() { Date = NullDateTime; } public bool IsNull => Date == NullDateTime; public RequestApprovedDate(DateTime date) { Date = date; } protected override IEnumerable GetAtomicValues() { // Using a yield return statement to return each element one at a time yield return Date; } } }