Select
produces a projection - it takes each element in the input sequence, passes it into a function, and returns a sequence of the values returned from the function.
You are trying to pass in an action which doesn't return a value. That won't work.
Assuming your
ProductMaster
entity already has a
SellingPrice
property, you could try adding
return n;
to your lambda. However, Entity Framework won't be able to convert that to a SQL query, so you'll need to add
.AsEnumerable()
to run the projection in memory:
... .Where(m => m.Material == id).AsEnumerable().Select(n =>
{
n.SellingPrice = ...;
return n;
});