public void AddPicture(Uri pictureUrl, PictureSize size) => Apply(new PictureAdded( Id, Guid.NewGuid(), pictureUrl.ToString(), size.Height, size.Width, _pictures.Count == 0?1:Pictures.Max(x => x.Order) ));
public void AddPicture(string pictureUri, PictureSize size) => Apply( new V1.PictureAddedToAClassifiedAd { PictureId = new Guid(), ClassifiedAdId = Id, OwnerId = OwnerId, Url = pictureUri, Height = size.Height, Width = size.Width, Order = Pictures.Any() ? Pictures.Max(x => x.Order) : 0 } );
public void AddPicture(Uri pictureUri, PictureSize size) => Apply( new PictureAddedToAClassifiedAd { PictureId = new Guid(), ClassifiedAdId = Id, OwnerId = OwnerId, Url = pictureUri.ToString(), Height = size.Height, Width = size.Width, Order = Pictures.Max(x => x.Order) } );