/// <summary> /// Creates a Clone with no Id, and CreationTime and LastModified set to Now. /// </summary> public virtual EntryBase Clone() { var now = MyDate.Now(); var clone = CloneInternal(); clone.Id = null; clone.CreationTime = now; clone.LastModified = now; clone.Title = Title; clone.Encrypted = Encrypted; return(clone); }
public EntryEditViewModel(TextEntry?entry) { var now = MyDate.Now(); if (entry != null) { Entry = entry; } else { Entry = new TextEntry { Id = null, CreationTime = now, LastModified = now, Title = "", Body = "", }; } Title = Entry.Title; }
protected override void OnUpdated(EntryBase item) { item.LastModified = MyDate.Now(); }