3
I took a system in aspx(VS2008) and I will have to make some improvements, add other features and all this using MVC5. Well, there’s a web service, there’s 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 question 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 that dbml is like edmx, but what is the difference between both?
T_PDV is a bd entity. I don’t understand what delegate does. I am reading and interpreting the above code because I need to rewrite the site in MVC adding new features. This is my scenario today.
See that he uses the delegate FUNC<>. I would like to know the reason of the delegate, by the way, I have had difficulties with delegate. I’m really trying to understand the code above for me to redo my web service.
– pnet
Well, that’s a new question, right? I think it’s in case you open up a new question.
– Leonel Sanches da Silva
That’s what I’d like to understand. It’s not a new question. As I said in the original post, I didn’t understand the code and it made the post. It is not a new doubt.
– pnet
See, these are two very different questions. One is related to the use of files, and the other is related to understanding the code. So I think you should ask another question to get the answer only as to the doubt of
delegate
, which is pertinent. But I can answer that part also without problems, in the same ask if it is necessary.– Leonel Sanches da Silva
Okay, of course I do. But look at the other side. You put a situation, whose problem is in several sectors. Gee, if you’re going to ask a question for each situation, it gets kind of repetitive, because often the code is the same. In a code we have many factors, which break down to ask a question for each will be asked, but repeating the code several times. Sometimes the question takes with it N doubts, like that for example, that a problem with dbml has led me not to understand why of delegate, queryable and etc.... All in the same doubt. downloaded something from queryable and delegate p/ read.
– pnet
@pnet I updated the response.
– Leonel Sanches da Silva