diff --git a/Jellyfin.Data/Entities/AccessSchedule.cs b/Jellyfin.Data/Entities/AccessSchedule.cs
index 7974d3addb..befc4ca02c 100644
--- a/Jellyfin.Data/Entities/AccessSchedule.cs
+++ b/Jellyfin.Data/Entities/AccessSchedule.cs
@@ -26,20 +26,20 @@ namespace Jellyfin.Data.Entities
}
///
- /// Gets or sets the id of this instance.
+ /// Gets the id of this instance.
///
///
/// Identity, Indexed, Required.
///
[XmlIgnore]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
- /// Gets or sets the id of the associated user.
+ /// Gets the id of the associated user.
///
[XmlIgnore]
- public Guid UserId { get; protected set; }
+ public Guid UserId { get; private set; }
///
/// Gets or sets the day of week.
diff --git a/Jellyfin.Data/Entities/ActivityLog.cs b/Jellyfin.Data/Entities/ActivityLog.cs
index e4534e8b5e..1d1b86552f 100644
--- a/Jellyfin.Data/Entities/ActivityLog.cs
+++ b/Jellyfin.Data/Entities/ActivityLog.cs
@@ -38,11 +38,10 @@ namespace Jellyfin.Data.Entities
}
///
- /// Gets or sets the identity of this instance.
- /// This is the key in the backing database.
+ /// Gets the identity of this instance.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the name.
@@ -120,7 +119,7 @@ namespace Jellyfin.Data.Entities
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs b/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs
index de37fb5446..b07b7c7315 100644
--- a/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs
+++ b/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs
@@ -27,13 +27,13 @@ namespace Jellyfin.Data.Entities
}
///
- /// Gets or sets the Id.
+ /// Gets the Id.
///
///
/// Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the user Id.
diff --git a/Jellyfin.Data/Entities/DisplayPreferences.cs b/Jellyfin.Data/Entities/DisplayPreferences.cs
index 64cd6812a4..646961238b 100644
--- a/Jellyfin.Data/Entities/DisplayPreferences.cs
+++ b/Jellyfin.Data/Entities/DisplayPreferences.cs
@@ -1,6 +1,4 @@
-#pragma warning disable CA2227
-
-using System;
+using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -35,13 +33,13 @@ namespace Jellyfin.Data.Entities
}
///
- /// Gets or sets the Id.
+ /// Gets the Id.
///
///
/// Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the user Id.
@@ -145,8 +143,8 @@ namespace Jellyfin.Data.Entities
public string? TvHome { get; set; }
///
- /// Gets or sets the home sections.
+ /// Gets the home sections.
///
- public virtual ICollection HomeSections { get; protected set; }
+ public virtual ICollection HomeSections { get; private set; }
}
}
diff --git a/Jellyfin.Data/Entities/Group.cs b/Jellyfin.Data/Entities/Group.cs
index b14e22b7b3..14da0bb155 100644
--- a/Jellyfin.Data/Entities/Group.cs
+++ b/Jellyfin.Data/Entities/Group.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -33,12 +31,12 @@ namespace Jellyfin.Data.Entities
}
///
- /// Gets or sets the id of this group.
+ /// Gets the id of this group.
///
///
/// Identity, Indexed, Required.
///
- public Guid Id { get; protected set; }
+ public Guid Id { get; private set; }
///
/// Gets or sets the group's name.
@@ -52,17 +50,17 @@ namespace Jellyfin.Data.Entities
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
- /// Gets or sets a collection containing the group's permissions.
+ /// Gets a collection containing the group's permissions.
///
- public virtual ICollection Permissions { get; protected set; }
+ public virtual ICollection Permissions { get; private set; }
///
- /// Gets or sets a collection containing the group's preferences.
+ /// Gets a collection containing the group's preferences.
///
- public virtual ICollection Preferences { get; protected set; }
+ public virtual ICollection Preferences { get; private set; }
///
public bool HasPermission(PermissionKind kind)
diff --git a/Jellyfin.Data/Entities/HomeSection.cs b/Jellyfin.Data/Entities/HomeSection.cs
index d03d0f7a86..e194aa537c 100644
--- a/Jellyfin.Data/Entities/HomeSection.cs
+++ b/Jellyfin.Data/Entities/HomeSection.cs
@@ -9,13 +9,13 @@ namespace Jellyfin.Data.Entities
public class HomeSection
{
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity. Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the Id of the associated display preferences.
diff --git a/Jellyfin.Data/Entities/ImageInfo.cs b/Jellyfin.Data/Entities/ImageInfo.cs
index e0c37047d8..b5c7a1c120 100644
--- a/Jellyfin.Data/Entities/ImageInfo.cs
+++ b/Jellyfin.Data/Entities/ImageInfo.cs
@@ -20,18 +20,18 @@ namespace Jellyfin.Data.Entities
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
- /// Gets or sets the user id.
+ /// Gets the user id.
///
- public Guid? UserId { get; protected set; }
+ public Guid? UserId { get; private set; }
///
/// Gets or sets the path of the image.
diff --git a/Jellyfin.Data/Entities/ItemDisplayPreferences.cs b/Jellyfin.Data/Entities/ItemDisplayPreferences.cs
index 4bfeb2fa30..948126d0a3 100644
--- a/Jellyfin.Data/Entities/ItemDisplayPreferences.cs
+++ b/Jellyfin.Data/Entities/ItemDisplayPreferences.cs
@@ -29,13 +29,13 @@ namespace Jellyfin.Data.Entities
}
///
- /// Gets or sets the Id.
+ /// Gets the id.
///
///
/// Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the user Id.
diff --git a/Jellyfin.Data/Entities/Libraries/Artwork.cs b/Jellyfin.Data/Entities/Libraries/Artwork.cs
index 84a524de2c..923525fc52 100644
--- a/Jellyfin.Data/Entities/Libraries/Artwork.cs
+++ b/Jellyfin.Data/Entities/Libraries/Artwork.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -30,13 +28,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the path.
@@ -58,7 +56,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/Book.cs b/Jellyfin.Data/Entities/Libraries/Book.cs
index aea3d58d58..a838686d05 100644
--- a/Jellyfin.Data/Entities/Libraries/Book.cs
+++ b/Jellyfin.Data/Entities/Libraries/Book.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
using Jellyfin.Data.Interfaces;
@@ -21,11 +19,11 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets a collection containing the metadata for this book.
+ /// Gets a collection containing the metadata for this book.
///
- public virtual ICollection BookMetadata { get; protected set; }
+ public virtual ICollection BookMetadata { get; private set; }
///
- public virtual ICollection Releases { get; protected set; }
+ public virtual ICollection Releases { get; private set; }
}
}
diff --git a/Jellyfin.Data/Entities/Libraries/BookMetadata.cs b/Jellyfin.Data/Entities/Libraries/BookMetadata.cs
index 1ff4327b01..4a350d200e 100644
--- a/Jellyfin.Data/Entities/Libraries/BookMetadata.cs
+++ b/Jellyfin.Data/Entities/Libraries/BookMetadata.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
using Jellyfin.Data.Interfaces;
@@ -26,9 +24,9 @@ namespace Jellyfin.Data.Entities.Libraries
public long? Isbn { get; set; }
///
- /// Gets or sets a collection of the publishers for this book.
+ /// Gets a collection of the publishers for this book.
///
- public virtual ICollection Publishers { get; protected set; }
+ public virtual ICollection Publishers { get; private set; }
///
public ICollection Companies => Publishers;
diff --git a/Jellyfin.Data/Entities/Libraries/Chapter.cs b/Jellyfin.Data/Entities/Libraries/Chapter.cs
index 11f53ae20a..3d81f713d6 100644
--- a/Jellyfin.Data/Entities/Libraries/Chapter.cs
+++ b/Jellyfin.Data/Entities/Libraries/Chapter.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -29,13 +27,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the name.
@@ -74,7 +72,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; protected set; }
+ public uint RowVersion { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/Collection.cs b/Jellyfin.Data/Entities/Libraries/Collection.cs
index 4253b7eccf..7de6019692 100644
--- a/Jellyfin.Data/Entities/Libraries/Collection.cs
+++ b/Jellyfin.Data/Entities/Libraries/Collection.cs
@@ -1,5 +1,4 @@
#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
-#pragma warning disable CA2227
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -22,13 +21,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the name.
@@ -42,12 +41,12 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
- /// Gets or sets a collection containing this collection's items.
+ /// Gets a collection containing this collection's items.
///
- public virtual ICollection Items { get; protected set; }
+ public virtual ICollection Items { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/CollectionItem.cs b/Jellyfin.Data/Entities/Libraries/CollectionItem.cs
index e19362bdf1..0cb4716dbe 100644
--- a/Jellyfin.Data/Entities/Libraries/CollectionItem.cs
+++ b/Jellyfin.Data/Entities/Libraries/CollectionItem.cs
@@ -29,7 +29,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
/// Gets or sets the library item.
diff --git a/Jellyfin.Data/Entities/Libraries/Company.cs b/Jellyfin.Data/Entities/Libraries/Company.cs
index 09050bb522..1abbee4458 100644
--- a/Jellyfin.Data/Entities/Libraries/Company.cs
+++ b/Jellyfin.Data/Entities/Libraries/Company.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
@@ -22,27 +20,27 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
- /// Gets or sets a collection containing the metadata.
+ /// Gets a collection containing the metadata.
///
- public virtual ICollection CompanyMetadata { get; protected set; }
+ public virtual ICollection CompanyMetadata { get; private set; }
///
- /// Gets or sets a collection containing this company's child companies.
+ /// Gets a collection containing this company's child companies.
///
- public virtual ICollection ChildCompanies { get; protected set; }
+ public virtual ICollection ChildCompanies { get; private set; }
///
public ICollection Companies => ChildCompanies;
diff --git a/Jellyfin.Data/Entities/Libraries/CustomItem.cs b/Jellyfin.Data/Entities/Libraries/CustomItem.cs
index 88d1a0c258..e27d01d860 100644
--- a/Jellyfin.Data/Entities/Libraries/CustomItem.cs
+++ b/Jellyfin.Data/Entities/Libraries/CustomItem.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
using Jellyfin.Data.Interfaces;
@@ -21,11 +19,11 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets a collection containing the metadata for this item.
+ /// Gets a collection containing the metadata for this item.
///
- public virtual ICollection CustomItemMetadata { get; protected set; }
+ public virtual ICollection CustomItemMetadata { get; private set; }
///
- public virtual ICollection Releases { get; protected set; }
+ public virtual ICollection Releases { get; private set; }
}
}
diff --git a/Jellyfin.Data/Entities/Libraries/Episode.cs b/Jellyfin.Data/Entities/Libraries/Episode.cs
index 458c7d9f5a..ce2f0c6178 100644
--- a/Jellyfin.Data/Entities/Libraries/Episode.cs
+++ b/Jellyfin.Data/Entities/Libraries/Episode.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
using Jellyfin.Data.Interfaces;
@@ -26,11 +24,11 @@ namespace Jellyfin.Data.Entities.Libraries
public int? EpisodeNumber { get; set; }
///
- public virtual ICollection Releases { get; protected set; }
+ public virtual ICollection Releases { get; private set; }
///
- /// Gets or sets a collection containing the metadata for this episode.
+ /// Gets a collection containing the metadata for this episode.
///
- public virtual ICollection EpisodeMetadata { get; protected set; }
+ public virtual ICollection EpisodeMetadata { get; private set; }
}
}
diff --git a/Jellyfin.Data/Entities/Libraries/Genre.cs b/Jellyfin.Data/Entities/Libraries/Genre.cs
index 9f3d650283..3b822ee828 100644
--- a/Jellyfin.Data/Entities/Libraries/Genre.cs
+++ b/Jellyfin.Data/Entities/Libraries/Genre.cs
@@ -19,13 +19,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the name.
@@ -39,7 +39,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; protected set; }
+ public uint RowVersion { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/ItemMetadata.cs b/Jellyfin.Data/Entities/Libraries/ItemMetadata.cs
index d12e011a8b..d429a90c61 100644
--- a/Jellyfin.Data/Entities/Libraries/ItemMetadata.cs
+++ b/Jellyfin.Data/Entities/Libraries/ItemMetadata.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -43,13 +41,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the title.
@@ -99,12 +97,12 @@ namespace Jellyfin.Data.Entities.Libraries
public DateTimeOffset? ReleaseDate { get; set; }
///
- /// Gets or sets the date added.
+ /// Gets the date added.
///
///
/// Required.
///
- public DateTime DateAdded { get; protected set; }
+ public DateTime DateAdded { get; private set; }
///
/// Gets or sets the date modified.
@@ -114,37 +112,32 @@ namespace Jellyfin.Data.Entities.Libraries
///
public DateTime DateModified { get; set; }
- ///
- /// Gets or sets the row version.
- ///
- ///
- /// Required, ConcurrencyToken.
- ///
+ ///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
- /// Gets or sets a collection containing the person roles for this item.
+ /// Gets a collection containing the person roles for this item.
///
- public virtual ICollection PersonRoles { get; protected set; }
+ public virtual ICollection PersonRoles { get; private set; }
///
- /// Gets or sets a collection containing the genres for this item.
+ /// Gets a collection containing the genres for this item.
///
- public virtual ICollection Genres { get; protected set; }
+ public virtual ICollection Genres { get; private set; }
///
- public virtual ICollection Artwork { get; protected set; }
+ public virtual ICollection Artwork { get; private set; }
///
- /// Gets or sets a collection containing the ratings for this item.
+ /// Gets a collection containing the ratings for this item.
///
- public virtual ICollection Ratings { get; protected set; }
+ public virtual ICollection Ratings { get; private set; }
///
- /// Gets or sets a collection containing the metadata sources for this item.
+ /// Gets a collection containing the metadata sources for this item.
///
- public virtual ICollection Sources { get; protected set; }
+ public virtual ICollection Sources { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/Library.cs b/Jellyfin.Data/Entities/Libraries/Library.cs
index e453849020..0db42a1c7b 100644
--- a/Jellyfin.Data/Entities/Libraries/Library.cs
+++ b/Jellyfin.Data/Entities/Libraries/Library.cs
@@ -21,13 +21,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the name.
@@ -49,7 +49,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/LibraryItem.cs b/Jellyfin.Data/Entities/Libraries/LibraryItem.cs
index 67ffad944b..d889b871ed 100644
--- a/Jellyfin.Data/Entities/Libraries/LibraryItem.cs
+++ b/Jellyfin.Data/Entities/Libraries/LibraryItem.cs
@@ -21,22 +21,22 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
- /// Gets or sets the date this library item was added.
+ /// Gets the date this library item was added.
///
- public DateTime DateAdded { get; protected set; }
+ public DateTime DateAdded { get; private set; }
///
[ConcurrencyCheck]
- public uint RowVersion { get; protected set; }
+ public uint RowVersion { get; private set; }
///
/// Gets or sets the library of this item.
diff --git a/Jellyfin.Data/Entities/Libraries/MediaFile.cs b/Jellyfin.Data/Entities/Libraries/MediaFile.cs
index f3e2fe6539..36e1e47776 100644
--- a/Jellyfin.Data/Entities/Libraries/MediaFile.cs
+++ b/Jellyfin.Data/Entities/Libraries/MediaFile.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -33,13 +31,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the path relative to the library root.
@@ -61,12 +59,12 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
- /// Gets or sets a collection containing the streams in this file.
+ /// Gets a collection containing the streams in this file.
///
- public virtual ICollection MediaFileStreams { get; protected set; }
+ public virtual ICollection MediaFileStreams { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/MediaFileStream.cs b/Jellyfin.Data/Entities/Libraries/MediaFileStream.cs
index ba21294fc9..e24e73ecb7 100644
--- a/Jellyfin.Data/Entities/Libraries/MediaFileStream.cs
+++ b/Jellyfin.Data/Entities/Libraries/MediaFileStream.cs
@@ -21,13 +21,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the stream number.
@@ -39,7 +39,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/MetadataProvider.cs b/Jellyfin.Data/Entities/Libraries/MetadataProvider.cs
index fb2587882d..b271960787 100644
--- a/Jellyfin.Data/Entities/Libraries/MetadataProvider.cs
+++ b/Jellyfin.Data/Entities/Libraries/MetadataProvider.cs
@@ -25,13 +25,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the name.
@@ -45,7 +45,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
public void OnSavingChanges()
diff --git a/Jellyfin.Data/Entities/Libraries/MetadataProviderId.cs b/Jellyfin.Data/Entities/Libraries/MetadataProviderId.cs
index 2a9c904c88..44c1985181 100644
--- a/Jellyfin.Data/Entities/Libraries/MetadataProviderId.cs
+++ b/Jellyfin.Data/Entities/Libraries/MetadataProviderId.cs
@@ -27,13 +27,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets the id.
+ /// Gets the id.
///
///
/// Identity, Indexed, Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int Id { get; protected set; }
+ public int Id { get; private set; }
///
/// Gets or sets the provider id.
@@ -47,7 +47,7 @@ namespace Jellyfin.Data.Entities.Libraries
///
[ConcurrencyCheck]
- public uint RowVersion { get; set; }
+ public uint RowVersion { get; private set; }
///
/// Gets or sets the metadata provider.
diff --git a/Jellyfin.Data/Entities/Libraries/Movie.cs b/Jellyfin.Data/Entities/Libraries/Movie.cs
index f89cacff44..499fafd0e1 100644
--- a/Jellyfin.Data/Entities/Libraries/Movie.cs
+++ b/Jellyfin.Data/Entities/Libraries/Movie.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
using Jellyfin.Data.Interfaces;
@@ -21,11 +19,11 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- public virtual ICollection Releases { get; protected set; }
+ public virtual ICollection Releases { get; private set; }
///
- /// Gets or sets a collection containing the metadata for this movie.
+ /// Gets a collection containing the metadata for this movie.
///
- public virtual ICollection MovieMetadata { get; protected set; }
+ public virtual ICollection MovieMetadata { get; private set; }
}
}
diff --git a/Jellyfin.Data/Entities/Libraries/MovieMetadata.cs b/Jellyfin.Data/Entities/Libraries/MovieMetadata.cs
index fb181dea60..44b5f34d7f 100644
--- a/Jellyfin.Data/Entities/Libraries/MovieMetadata.cs
+++ b/Jellyfin.Data/Entities/Libraries/MovieMetadata.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Jellyfin.Data.Interfaces;
@@ -62,9 +60,9 @@ namespace Jellyfin.Data.Entities.Libraries
public string? Country { get; set; }
///
- /// Gets or sets the studios that produced this movie.
+ /// Gets the studios that produced this movie.
///
- public virtual ICollection Studios { get; protected set; }
+ public virtual ICollection Studios { get; private set; }
///
public ICollection Companies => Studios;
diff --git a/Jellyfin.Data/Entities/Libraries/MusicAlbum.cs b/Jellyfin.Data/Entities/Libraries/MusicAlbum.cs
index 4049cdac8e..d6231bbf02 100644
--- a/Jellyfin.Data/Entities/Libraries/MusicAlbum.cs
+++ b/Jellyfin.Data/Entities/Libraries/MusicAlbum.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CA2227
-
using System.Collections.Generic;
namespace Jellyfin.Data.Entities.Libraries
@@ -20,13 +18,13 @@ namespace Jellyfin.Data.Entities.Libraries
}
///
- /// Gets or sets a collection containing the album metadata.
+ /// Gets a collection containing the album metadata.
///
- public virtual ICollection MusicAlbumMetadata { get; protected set; }
+ public virtual ICollection MusicAlbumMetadata { get; private set; }
///
- /// Gets or sets a collection containing the tracks.
+ /// Gets a collection containing the tracks.
///
- public virtual ICollection