Beispiel #1
0
        public static PhotoEntry New(string title, string description)
        {
            var newId   = Guid.NewGuid().ToString();
            var listing = new PhotoEntry(newId, title, description, DateTimeOffset.Now);

            return(listing);
        }
Beispiel #2
0
        public static PhotoEntryTableEntity FromEntity(PhotoEntry entity)
        {
            var tableEntity = new PhotoEntryTableEntity(entity.Id);

            tableEntity.Title       = entity.Title;
            tableEntity.Description = entity.Description;
            tableEntity.PublishedOn = entity.PublishedOn;

            return(tableEntity);
        }