mirror of
https://github.com/sphildreth/roadie
synced 2024-11-10 06:44:12 +00:00
32 lines
No EOL
1,006 B
C#
32 lines
No EOL
1,006 B
C#
using System;
|
|
|
|
namespace Roadie.Library.Models
|
|
{
|
|
[Serializable]
|
|
public sealed class GenreList : EntityInfoModelBase
|
|
{
|
|
public int? ArtistCount { get; set; }
|
|
public DataToken Genre { get; set; }
|
|
public int? ReleaseCount { get; set; }
|
|
public Image Thumbnail { get; set; }
|
|
|
|
public static GenreList FromDataGenre(Data.Genre genre, Image genreThumbnail, int? artistCount, int? releaseCount)
|
|
{
|
|
return new GenreList
|
|
{
|
|
Id = genre.RoadieId,
|
|
Genre = new DataToken
|
|
{
|
|
Text = genre.Name,
|
|
Value = genre.RoadieId.ToString()
|
|
},
|
|
SortName = genre.SortName,
|
|
CreatedDate = genre.CreatedDate,
|
|
LastUpdated = genre.LastUpdated,
|
|
ArtistCount = artistCount,
|
|
ReleaseCount = releaseCount,
|
|
Thumbnail = genreThumbnail
|
|
};
|
|
}
|
|
}
|
|
} |