mirror of
https://github.com/zoriya/EntityFrameworkCore.Projectables.git
synced 2026-05-25 12:03:20 +00:00
Fixed functional test
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
SELECT CAST([c].[Age] AS float) / [c].[AverageLifespan] AS [LifeProgression], CAST([c].[MentalAge] AS float) / [c].[AverageLifespan] AS [MentalLifeProgression]
|
||||
FROM [Cat] AS [c]
|
||||
@@ -31,10 +31,6 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests
|
||||
[Projectable]
|
||||
public double MentalLifeProgression
|
||||
=> MentalAge / AverageLifespan;
|
||||
|
||||
[Projectable]
|
||||
public double ReservedAge
|
||||
=> base.Age; // base should not affect the generated outcome
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +40,7 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests
|
||||
using var dbContext = new SampleDbContext<Cat>();
|
||||
|
||||
var query = dbContext.Set<Cat>()
|
||||
.Select(x => new { x.LifeProgression, x.AverageLifespan });
|
||||
.Select(x => new { x.LifeProgression, x.MentalLifeProgression });
|
||||
|
||||
return Verifier.Verify(query.ToQueryString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user