我想連接一個字符串,使用lambda比較某個條件下的連接值。Linq to entities - lambda - 連接字符串
Invoices = Invoices.Where(f => ((string)f.invoice_prefix + String.Format("{0:0000}", Convert.ToInt32(f.invoice_number))).ToLower().Equals(condition7));
但我得到一個錯誤信息:
名稱 'F' 並不在當前的背景下
試了的String.Format存在,String.Concat像
變種Invoices = Invoices.Where(f => (String.Format("{0}{1}",f.invoice_prefix,String.Format("{0:0000}", Convert.ToInt32(f.invoice_number)))).ToLower().Equals(condition7));
但沒有成功...有人可以幫我的語法嗎?
在此先感謝!
什麼是「發票」? – Dave
IQueryable發票 –
tortuga