I got a system in aspx (VS2008) and I have to make some improvements, add other features and all this using MVC5. Well, there's a web service, which has a guy like that:
static Func<lqDataDataContext, T_PDV, IQueryable<T_PDV>>
qryConsPdv = CompiledQuery.Compile(
(lqDataDataContext lqPT, T_PDV p) =>
lqPT.T_PDVs.Where(i =>
i.CNPJ.Contains(p.CNPJ) &&
i.RazaoSocial.Contains(p.RazaoSocial)//== (cnpj == "" ? i.CNPJ : cnpj)
));
The point is that lqData is a .dbml file. In my MVC I generated some .edmx file. The question is: Should I replace .dbml with .edmx? If yes, how to do this? I confess that I still do not understand the code posted. I know dbml is like edmx, but what's the difference between them?
T_PDV is a DB entity. I did not understand what the delegate does. I am reading and interpreting the above code, since I need to rewrite the site in MVC adding new features. This is my scenario today.