public static MvcHtmlString DisplayPlace <Model>(this HtmlHelper <Model> html, BaseAlbumViewModel album)
        {
            string placeString = string.Join(", ", new[] { album.Place, album.City, album.Country }.Where(str => !string.IsNullOrEmpty(str)));

            return(new MvcHtmlString(placeString));
        }
Example #2
0
 public AlbumEntityCreator(BaseAlbumViewModel albumViewModel)
 {
     _abumViewModel = albumViewModel;
 }
        public static MvcHtmlString DisplayPeriod <Model>(this HtmlHelper <Model> html, BaseAlbumViewModel album)
        {
            string formatString = "dd.MM.yyyy";

            return(new MvcHtmlString(album.From.ToFormatString(formatString) + " - " + album.To.ToFormatString(formatString)));
        }