Skip to content

Commit

Permalink
Replace decimal with double in benchmarks (#20876)
Browse files Browse the repository at this point in the history
Because Sqlite doesn't support operations on decimals (e.g. ordering)

Fixes #20822
  • Loading branch information
roji authored May 7, 2020
1 parent 3fbad8f commit 24847f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion benchmark/EF.Benchmarks.Shared/Models/Orders/OrderLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class OrderLine
{
public int OrderLineId { get; set; }
public int Quantity { get; set; }
public decimal Price { get; set; }
public double Price { get; set; }
public bool IsSubjectToTax { get; set; }
public string SpecialRequests { get; set; }
public bool IsShipped { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions benchmark/EF.Benchmarks.Shared/Models/Orders/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class Product
public string Name { get; set; }
public string Description { get; set; }
public string SKU { get; set; }
public decimal Retail { get; set; }
public decimal CurrentPrice { get; set; }
public double Retail { get; set; }
public double CurrentPrice { get; set; }
public int TargetStockLevel { get; set; }
public int ActualStockLevel { get; set; }
public int? ReorderStockLevel { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private class DTO
public string Description { get; set; }
public int ActualStockLevel { get; set; }
public string SKU { get; set; }
public decimal Savings { get; set; }
public double Savings { get; set; }
public int Surplus { get; set; }
}
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/EFCore.Benchmarks/Query/QueryCompilationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private class DTO
public string Description { get; set; }
public int ActualStockLevel { get; set; }
public string SKU { get; set; }
public decimal Savings { get; set; }
public double Savings { get; set; }
public int Surplus { get; set; }
}

Expand Down

0 comments on commit 24847f4

Please sign in to comment.