public static PhotoEntry New(string title, string description) { var newId = Guid.NewGuid().ToString(); var listing = new PhotoEntry(newId, title, description, DateTimeOffset.Now); return(listing); }
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); }