Linq to sql linq到sql查询中的多种数据类型

Linq to sql linq到sql查询中的多种数据类型,linq-to-sql,Linq To Sql,我有一个问题: var list_transaction = from i in Dt.Transactions join c in this.Dt.Customers on i.CustomerID equals c.ID join e in this.Dt.Employees on i.EmployeeID equals e.ID

我有一个问题:

var list_transaction = from i in Dt.Transactions
                              join c in this.Dt.Customers on i.CustomerID equals c.ID
                               join e in this.Dt.Employees on i.EmployeeID equals e.ID
                               join p in this.Dt.Projects on i.ProjectID equals p.ID
                               where
                               i.CustomerID == idCus &&
                               i.TransactionStep == 3 &&
                               i.EmployeeID == e.ID &&
                               i.ProjectID == p.ID
                               select new {
                                    VAT = (i.Taxable * i.Total * p.VATRate/100)
                               };
问题:VAT是具有不同数据类型的三个值的乘积。应税金额为整数,总额为货币,增值税税率为浮动

那么有人能告诉我,我怎样才能在这个问题中表达出来

非常感谢。

试试这个:

 System.Convert.ToDouble(i.Total) + (i.Taxable * System.Convert.ToDouble(i.Total) 
 * p.VATRate / 100)
试试这个:

 System.Convert.ToDouble(i.Total) + (i.Taxable * System.Convert.ToDouble(i.Total) 
 * p.VATRate / 100)