igor-tkachev/bltoolkit — Issue #71: Cast() is added unnecessary when translating to SQL
Author: MozgC
Created: 2012-01-12 17:43:02+00:00
State: open

```csharp
var q = from ... select mp.Price * (1.0m - s.Discount / 100.0m);
```
mp.Price is of decimal type and s.Discount is of int type

The resulting SQL is:
```... mp.Price * (1 - Cast(s.Discount as Decimal(10,0)) / 100) ...```

The cast of s.Discount is unnecessary (and may lead to reducing performance?).