From d9a5a917f6741bfe1a5731ae552c1752f002fa71 Mon Sep 17 00:00:00 2001 From: Steven Hildreth Date: Sun, 24 Nov 2019 15:58:38 -0600 Subject: [PATCH] Small buf fixes and many ToListAsync implementations. --- Roadie.Api.Library/Data/Collection.cs | 13 +- .../Data/Context/IRoadieDbContext.cs | 2 + .../Implementation/LinqDbContextBase.cs | 33 ++- .../Data/Context/RoadieDbContext.cs | 3 + Roadie.Api.Library/Data/Credit.cs | 43 +++ Roadie.Api.Library/Data/CreditCategory.cs | 20 ++ Roadie.Api.Library/Data/EntityBase.cs | 10 +- Roadie.Api.Library/Data/NamedEntityBase.cs | 21 +- Roadie.Api.Library/Imaging/ImageHelper.cs | 97 +++++++ Roadie.Api.Library/Models/Artist.cs | 5 +- Roadie.Api.Library/Models/ArtistList.cs | 2 +- Roadie.Api.Library/Models/BookmarkList.cs | 5 +- .../Models/Collections/CollectionList.cs | 2 +- Roadie.Api.Library/Models/Credit.cs | 28 ++ Roadie.Api.Library/Models/CreditCategory.cs | 17 ++ Roadie.Api.Library/Models/CreditList.cs | 15 ++ .../Models/EntityInfoModelBase.cs | 3 +- Roadie.Api.Library/Models/EntityModelBase.cs | 30 ++- Roadie.Api.Library/Models/GenreList.cs | 21 +- Roadie.Api.Library/Models/Image.cs | 38 ++- Roadie.Api.Library/Models/Label.cs | 17 +- Roadie.Api.Library/Models/LabelList.cs | 2 +- .../Models/Playlists/PlaylistList.cs | 2 +- .../Models/Playlists/PlaylistTrackList.cs | 2 +- Roadie.Api.Library/Models/Releases/Release.cs | 6 +- .../Models/Releases/ReleaseLabelList.cs | 2 +- .../Models/Releases/ReleaseList.cs | 2 +- .../Models/Releases/ReleaseMediaList.cs | 2 +- Roadie.Api.Library/Models/Track.cs | 4 +- Roadie.Api.Library/Models/TrackList.cs | 2 +- Roadie.Api.Library/Models/Users/UserList.cs | 2 +- Roadie.Api.Library/Roadie.Library.csproj | 2 +- Roadie.Api.Services/ArtistService.cs | 143 +++++----- Roadie.Api.Services/BookmarkService.cs | 48 ++-- Roadie.Api.Services/CollectionService.cs | 26 +- Roadie.Api.Services/GenreService.cs | 9 +- Roadie.Api.Services/IImageService.cs | 2 - Roadie.Api.Services/ILookupService.cs | 2 + Roadie.Api.Services/ISubsonicService.cs | 29 +- Roadie.Api.Services/IUserService.cs | 2 + Roadie.Api.Services/ImageService.cs | 141 ++++------ Roadie.Api.Services/LabelService.cs | 22 +- Roadie.Api.Services/LookupService.cs | 24 +- Roadie.Api.Services/PlayActivityService.cs | 29 +- Roadie.Api.Services/PlaylistService.cs | 36 +-- Roadie.Api.Services/ReleaseService.cs | 252 +++++++++++++----- Roadie.Api.Services/ServiceBase.cs | 234 +++++----------- Roadie.Api.Services/SubsonicService.cs | 147 +++++----- Roadie.Api.Services/TrackService.cs | 168 ++++++++---- Roadie.Api.Services/UserService.cs | 115 ++++---- .../Controllers/EntityControllerBase.cs | 3 +- Roadie.Api/Controllers/ImageController.cs | 101 ++----- Roadie.Api/Controllers/LookupController.cs | 11 + Roadie.Api/Controllers/UserController.cs | 10 + Roadie.Api/Properties/launchSettings.json | 2 +- Roadie.Api/Roadie.Api.csproj | 5 + Roadie.Api/Startup.cs | 21 ++ Scripts/MySQL/Upgrade0009.sql | 45 ++++ Scripts/MySQL/roadie.sql | 56 ++-- 59 files changed, 1269 insertions(+), 867 deletions(-) create mode 100644 Roadie.Api.Library/Data/Credit.cs create mode 100644 Roadie.Api.Library/Data/CreditCategory.cs create mode 100644 Roadie.Api.Library/Models/Credit.cs create mode 100644 Roadie.Api.Library/Models/CreditCategory.cs create mode 100644 Roadie.Api.Library/Models/CreditList.cs create mode 100644 Scripts/MySQL/Upgrade0009.sql diff --git a/Roadie.Api.Library/Data/Collection.cs b/Roadie.Api.Library/Data/Collection.cs index 4d59d17..a26c354 100644 --- a/Roadie.Api.Library/Data/Collection.cs +++ b/Roadie.Api.Library/Data/Collection.cs @@ -8,9 +8,11 @@ namespace Roadie.Library.Data [Table("collection")] public partial class Collection : NamedEntityBase { - [Column("collectionCount")] public int CollectionCount { get; set; } + [Column("collectionCount")] + public int CollectionCount { get; set; } - [Column("collectionType")] public CollectionType? CollectionType { get; set; } + [Column("collectionType")] + public CollectionType? CollectionType { get; set; } public ICollection Comments { get; set; } @@ -18,7 +20,9 @@ namespace Roadie.Library.Data [MaxLength(4000)] public string Description { get; set; } - [Column("edition")] [MaxLength(200)] public string Edition { get; set; } + [Column("edition")] + [MaxLength(200)] + public string Edition { get; set; } [Column("listInCSV", TypeName = "text")] [MaxLength(65535)] @@ -28,7 +32,8 @@ namespace Roadie.Library.Data [MaxLength(200)] public string ListInCSVFormat { get; set; } - [Column("maintainerId")] public int MaintainerId { get; set; } + [Column("maintainerId")] + public int MaintainerId { get; set; } public ICollection Releases { get; set; } } diff --git a/Roadie.Api.Library/Data/Context/IRoadieDbContext.cs b/Roadie.Api.Library/Data/Context/IRoadieDbContext.cs index 0328855..9d34a36 100644 --- a/Roadie.Api.Library/Data/Context/IRoadieDbContext.cs +++ b/Roadie.Api.Library/Data/Context/IRoadieDbContext.cs @@ -24,6 +24,8 @@ namespace Roadie.Library.Data.Context DbSet Collections { get; set; } DbSet CommentReactions { get; set; } DbSet Comments { get; set; } + DbSet Credits { get; set; } + DbSet CreditCategory { get; set; } DatabaseFacade Database { get; } DbSet Genres { get; set; } DbSet