Linq Order

January 3, 2021 admin 0

Order By Single Column var result = context.users .Where(x => x.is_active) .Select(x => new User { id = x.user_id, name = x.firstname, address = x.address, […]

Linq Format Values

January 3, 2021 admin 0

Currency Conversion result = context.payments .Select(x => new Payment { id = x.payment_id, paid_amount = x.paid_amount != null ? x.paid_amount.Value.ToString(“N2”) : “0.00” }).ToList(); Date Conversion […]

Linq Filter

January 3, 2021 admin 0

Linq Filters | Distinct, Linq Contains Distinct ———– result = context.users .Select(x => new User{ user_name= x.user_name }).Distinct().ToList();