LINQ Query using UDF that receives parameters from the query
- by Ben Fidge
I need help using a UDF in a LINQ which calculates a users position from a fixed point.
int pointX = 567, int pointY = 534; // random points on a square grid
var q = from n in _context.Users
join m in _context.GetUserDistance(n.posY, n.posY, pointX, pointY, n.UserId) on n.UserId equals m.UserId
select new User() {
PosX = n.PosX,
PosY =…