No Image

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 = […]

No Image

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 […]

No Image

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();

No Image

Projection | Linq

January 3, 2021 admin 0

The process of transforming the results of a query into a new readable form, is called projection // First Record in matched Tuples var names […]