Guest User

Untitled

a guest
Feb 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. SELECT *
  2. FROM [Incentivos].[dbo].[Incentivos] AS I
  3. INNER JOIN [Incentivos].[dbo].[Captura] AS C ON I.CapturaID = C.ID
  4. WHERE I.EmpleadoID =4530 and C.mdEstatusRegistro = 1
  5.  
  6. var ce = _contexto.Empleados.Where(x => x.nCodigoEmpleado == (int)codigoEmpleado)
  7. .Select(x => x.ID).FirstOrDefault(); //4530 value
  8.  
  9. //JOIN
  10. var Incentivo = _contexto.Incentivos
  11. .Join(captura, x => x.CapturaID, y => y.ID, (x, y) => new { x, y })
  12. .Where(x => x.y.mdEstatusRegistro && x.x.EmpleadoID == ce)
  13. .Select(b=> b.x).FirstOrDefault();
Add Comment
Please, Sign In to add comment