In SQL I do this:
select campo1 as teste from tabela
And in a lambda ? How would I do it? I have this lambda with multiple tables and the ValuePayment
field repeats several times.
var qry = db.User.Join(db.Solicitation, user => user.UserID, sol => sol.UserID, (user, sol) => new { user, sol })
.Join(db.Payments, sol => sol.sol.SolicitationID, py => py.SolicitationID, (sol, py) => new { sol, py })
.Join(db.RefundKM, sol => sol.sol.sol.SolicitationID, km => km.SolicitationID, (sol, km) => new { sol, km })
.Join(db.Refund, sol => sol.sol.sol.sol.SolicitationID, re => re.SolicitationID, (sol, re) => new { sol, re })
.Select(syn => new
{
syn.sol.sol.sol.user.EmployeeID,
syn.sol.sol.sol.user.EmployeeStatus,
syn.sol.sol.sol.user.EmployeeFirstName,
syn.sol.sol.sol.user.Grade,
syn.sol.sol.sol.sol.SolicitationID,
syn.sol.sol.sol.sol.StatusSolicitation,
syn.sol.sol.sol.sol.DateFinancing,
syn.sol.sol.sol.sol.Manufacturer,
syn.sol.sol.sol.sol.Chassi,
syn.sol.sol.sol.sol.Model,
syn.sol.sol.sol.sol.ValueProperty,
syn.sol.sol.sol.sol.ValueGranted,
syn.sol.sol.py.PaymentStatus,
syn.sol.sol.py.ValuePayment,
syn.sol.sol.py.ValueInterest,
syn.sol.km.ValuePayment,
syn.re.ValuePayment
});