I have a problem with this SQL sentence:
SELECT DOCUMENTOS.*
FROM DOCUMENTOS
INNER JOIN
DOCUMENTOS_NOTARIOS ON DOCUMENTOS.uniCODOBJ = DOCUMENTOS_NOTARIOS.UNICODDOC
INNER JOIN
NOTARIOS ON DOCUMENTOS_NOTARIOS.UNICODNOT = NOTARIOS.uniCODOBJ
Where notarios.unicodobj = '84B11CDE-1C4B-4D0F-8C68-A54074B8D652'
I would to pass to LINQ for entity framework and I need the results into IQueryable list
I Tried this but I don't know how to pass to IQueryable list,
List<DOCUMENTOS> DocumentosByNotarioList = new List<DOCUMENTOS>();
var query = from d in db.DOCUMENTOS
join dn in db.DOCUMENTOS_NOTARIOS on d.uniCODOBJ equals dn.UNICODDOC
join n in db.NOTARIOS on dn.UNICODNOT equals n.uniCODOBJ
where n.uniCODOBJ == test
select new
{
d.uniCODOBJ,
d.strTITOL,
d.strNOMPRO,
d.strFECINI,
d.strFECFIN
};
I don't undertand very well this languange I prefer this type...
DocumentsList = db.DOCUMENTOS
.Where(d => nombre == null || d.strTITOL.Contains(nombre))
.Where(d => fechaIni == string.Empty || d.strFECINI.Equals(fechaIni))
.Where(d => fechaFin == string.Empty || d.strFECFIN.Equals(fechaFin))
.Where(d => tipoLibro == Guid.Empty || d.uniCODSER == tipoLibro)
.Where(d => firmaTopo == null || d.strFIRTOP == firmaTopo)
.OrderByDescending(d => d.datFECCER).ToList();
Thanks for advance!