Ami Kar

Ami Kar

  • 1.2k
  • 558
  • 17.9k

Multiple if else in linq select property

Feb 1 2021 4:51 AM
If family income is less then 20k then 10% discount , if income is less than 35k then 5 % discount above 35k no discount. var students= context.Students.Select (x=>new{ Income=x.parent.Income, Discount=x.parent.Income<20k?10:what to write here. })

Answers (1)