От: | s_aa | ||
Дата: | 10.12.17 17:40 | ||
Оценка: | 66 (1) |
var lst = ctx.ClsClients.Where(s => s.Office == (String.IsNullOrEmpty(office) ? 70 : Int32.Parse(office))).ToList();
А это работает ...{System.InvalidOperationException: An exception was thrown while attempting to evaluate the LINQ query parameter expression 'Parse(value(ac.Controllers.HomeController+<>c__DisplayClass2_0).office)'. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: String
var lst = ctx.ClsClients.Where(s => s.Office == (String.IsNullOrEmpty(office) ? 70 : 20)).ToList();