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
new
is a keyword used to instantiate an object in C#new
means you instantiate a new objectif you're projecting data, then you do in fact want to create something
that something being the object you're projecting your data into
What do you mean by retrieve? Select is for transformations... Maybe explain what you actually want to accomplish
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)