Lyo.Rating
1.0.13
dotnet add package Lyo.Rating --version 1.0.13
NuGet\Install-Package Lyo.Rating -Version 1.0.13
<PackageReference Include="Lyo.Rating" Version="1.0.13" />
<PackageVersion Include="Lyo.Rating" Version="1.0.13" />
<PackageReference Include="Lyo.Rating" />
paket add Lyo.Rating --version 1.0.13
#r "nuget: Lyo.Rating, 1.0.13"
#:package Lyo.Rating@1.0.13
#addin nuget:?package=Lyo.Rating&version=1.0.13
#tool nuget:?package=Lyo.Rating&version=1.0.13
Lyo.Rating
Abstractions for rating and reviewing entities, plus like/dislike reactions on those ratings. Each rating is keyed by (forEntity, fromEntity, subject), so the same actor can rate the same target on multiple subject axes (e.g. "scary", "action"). A null subject is a general rating.
Examples
RatingReactionType
public enum RatingReactionType
{
Like = 0,
Dislike = 1
}
RatingRef
public static EntityRef ForRating(Guid ratingId)
=> EntityRef.ForKey("Rating", ratingId.ToString());
IRatingStore
SaveAsync(RatingRecord rating, CancellationToken ct = default)upserts. When an active row with the same(forEntity, fromEntity, subject)tuple already exists, itsValue,Title,Message,LikeCount, andDislikeCountare updated; otherwise a new row is inserted.GetByIdAsync(Guid id, CancellationToken ct = default)single rating by id.GetForEntityAsync(EntityRef forEntity, CancellationToken ct = default)every active rating for a target entity (across all raters and subjects).GetForEntityFromEntityAsync(EntityRef forEntity, EntityRef fromEntity, string? subject = null, CancellationToken ct = default)the specific rating a single actor left on a target for the given subject.GetFromEntityAsync(EntityRef fromEntity, CancellationToken ct = default)every rating authored by the given actor.GetForEntityTypeAsync(string forEntityType, Guid? forEntityId = null, CancellationToken ct = default)every rating for a target type, optionally narrowed to a single target id.DeleteAsync(Guid id, CancellationToken ct = default)soft-delete a rating (and remove its reactions).DeleteForEntityFromEntityAsync(EntityRef forEntity, EntityRef fromEntity, string? subject = null, CancellationToken ct = default)soft-delete the rating(s) for a(forEntity, fromEntity, subject)tuple.DeleteForEntityAsync(EntityRef forEntity, CancellationToken ct = default)soft-delete every rating attached to a target (and their reactions).
RatingRecord
Subject. Optional axis label (e.g."scary");nullis a general rating.Title. Optional review title.Value. Optionaldecimalscore.Message. Optional review body.LikeCount/DislikeCount. Cached counters maintained by the reaction methods.UpdatedTimestamp. Last update time (UTC), nullable.
RatingReactionRecord
Standalone row (not EntityRelationRow) with subject/actor columns (parent rating on for_entity_*; reactor on from_entity_*), plus ReactionType and CreatedTimestamp.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.EntityReference.Models(direct, lyo)Lyo.Common(transitive, lyo)Lyo.Exceptions(transitive, lyo)Microsoft.Extensions.Logging.Abstractions10.0.5(transitive, microsoft)System.Memory4.6.3(transitive, microsoft, netstandard2.0)System.Text.Json10.0.5(transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.EntityReference.Models (>= 1.0.13)
-
net10.0
- Lyo.EntityReference.Models (>= 1.0.13)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Lyo.Rating:
| Package | Downloads |
|---|---|
|
Lyo.Rating.Postgres
PostgreSQL implementation of Lyo.Rating using Entity Framework Core. Uses EntityRef (EntityType + EntityId) for generic entity references. |
GitHub repositories
This package is not used by any popular GitHub repositories.