mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-05 15:42:27 +00:00
Update EntityFramework to 6.0.2
This commit is contained in:
parent
b165d5a2ce
commit
9253c332aa
5 changed files with 13 additions and 13 deletions
|
@ -9,8 +9,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.2"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.2"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.2"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -74,7 +74,7 @@ public class ReviewController : ControllerBase
|
|||
this.database.RatedLevels.Add(ratedLevel);
|
||||
}
|
||||
|
||||
ratedLevel.Rating = Math.Max(Math.Min(1, rating), -1);
|
||||
ratedLevel.Rating = Math.Clamp(rating, -1, 1);
|
||||
|
||||
Review? review = await this.database.Reviews.FirstOrDefaultAsync(r => r.SlotId == slotId && r.ReviewerId == user.UserId);
|
||||
if (review != null) review.Thumb = ratedLevel.Rating;
|
||||
|
@ -161,12 +161,12 @@ public class ReviewController : ControllerBase
|
|||
yourReview = new Review();
|
||||
yourReview.ReviewerId = user.UserId;
|
||||
yourReview.Reviewer = user;
|
||||
yourReview.Thumb = ratedLevel?.Rating == null ? 0 : ratedLevel.Rating;
|
||||
yourReview.Thumb = ratedLevel?.Rating ?? 0;
|
||||
yourReview.Slot = slot;
|
||||
yourReview.SlotId = slotId;
|
||||
yourReview.Deleted = false;
|
||||
yourReview.DeletedBy = DeletedBy.None;
|
||||
yourReview.Text = "You haven't reviewed this level yet. Edit this blank review to upload one!";
|
||||
yourReview.Text = "You haven't reviewed this level yet. Edit this to write one!";
|
||||
yourReview.LabelCollection = "";
|
||||
yourReview.Timestamp = TimeHelper.UnixTimeMilliseconds();
|
||||
}
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
<PackageReference Include="InfluxDB.Client" Version="3.3.0"/>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0"/>
|
||||
<PackageReference Include="Kettu" Version="1.2.2"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.1"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.1">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.2"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.2"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue