C
C#•10mo ago
🙈

can some xpalin why in Linq

In linquo querys i need to. use the word Select(p => new) what dose new mean i dont want to create anything but rather retrive data
5 Replies
Jimmacle
Jimmacle•10mo ago
new is a keyword used to instantiate an object in C#
Angius
Angius•10mo ago
new means you instantiate a new object
Jimmacle
Jimmacle•10mo ago
if you're projecting data, then you do in fact want to create something that something being the object you're projecting your data into
Anu6is
Anu6is•10mo ago
What do you mean by retrieve? Select is for transformations... Maybe explain what you actually want to accomplish
Jimmacle
Jimmacle•10mo ago
based on previous threads this is probably an EF Core query projecting the results to some model (LINQ is not just for EF Core, fwiw)
Want results from more Discord servers?
Add your server