OpenReservation / ReservationServer

预约系统 ReservationSystem powered by asp.net core
https://reservation.weihanli.xyz
MIT License
231 stars 89 forks source link

System.InvalidOperationException: The LINQ expression 'DbSet<ReservationPlace> #33

Closed WeihanLi closed 4 years ago

WeihanLi commented 4 years ago

https://sentry.io/organizations/weihanli/issues/1449528537/?referrer=github_plugin

System.InvalidOperationException: The LINQ expression 'DbSet<ReservationPlace>
    .Where(r => !(r.IsDel))
    .Any(r => r.PlaceName.ToUpperInvariant().Equals(__ToUpperInvariant_0) && r.IsDel == False)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
  Module "WeihanLi.EntityFramework.EFRepository`2", in Exist
    Boolean Exist(System.Linq.Expressions.Expression`1[System.Func`2[TEntity,System.Boolean]])
  File "/src/ActivityReservation/ActivityReservation.AdminLogic/Controllers/ReservationPlaceController.cs", line 103, in AddPlace
    Microsoft.AspNetCore.Mvc.ActionResult AddPlace(System.String)
  Module "(unknown)", in lambda_method
    System.Object lambda_method(System.Runtime.CompilerServices.Closure, System.Object, System.Object[])
  File "/src/ActivityReservation/ActivityReservation.Helper/Extensions/PerformanceLogExtension.cs", line 23, in MoveNext
    Void MoveNext()
  File "/src/ActivityReservation/ActivityReservation.Helper/Extensions/RequestLogExtension.cs", line 30, in MoveNext
    Void MoveNext()
...
(57 additional frame(s) were not displayed)

The LINQ expression 'DbSet<ReservationPlace>
    .Where(r => !(r.IsDel))
    .Any(r => r.PlaceName.ToUpperInvariant().Equals(__ToUpperInvariant_0) && r.IsDel == False)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

WeihanLi commented 4 years ago

resolved