I have 3 tables, Comics (id, Name, number ...), Authors (id, name ...) and Illustrators (id, name ...), what I want to do is a query (for a search engine ) that if I tell him to look for the word "Batman" show me if there are coincidences in the names of both 3 tables.
I have this, that I have been finding for intenert, but it gives me a failure in the Join
, and I can not find out why.
Thanks and regards.
PS: Let's see if I explain it well. I try to use the ORM so that when the program does a search with a word I compare it with 3 different fields and if there is a match it returns an object.
ComictecaEntities mo = new ComictecaEntities();
String[] titulos = { "hola", "hola", "hola" };
DbSqlQuery<Comics> nop = mo.Comics.Join(mo.Comics,
Comics => Comics.Comic_id,
Autores => Autores.Autor_id,
Dibujantes => Dibujantes.Dibujante_id,
(Comics) => new { Comics, Autores, Dibujantes }).Where(fullEntry => fullEntry.Comics.Titulo == "hola");