Questions tagged as 'linq-to-entities'

2
answers

How to convert Float to String using LINQ to entity?

How to convert Float to String using LINQ to entity? I need to convert a field from my database that has the float type to the string type in my C # using LINQ. Try using Convert.ToString, ChaveArquivo = Convert.ToString(n.scanIma.I...
asked by 22.09.2016 / 15:20
2
answers

Filtering for empty children

I have two entities ( TipoDeRequerimento and TipoRequerimentoSituaçãoAcademica ) in my query. Today I can make a filter to bring the Types of requirements that have a certain academic situation pre-registered. Now I need this filt...
asked by 04.10.2017 / 02:23
1
answer

Doubt with join between two classes

I have the Classes: class Procedimento { public string CodProcedimento { get; set; } public string NomeProcedimento { get; set; } public string TpSexo { get; set; } public int IdadeMinima { get; set; }...
asked by 30.01.2017 / 20:02
1
answer

Bank table does not update

I have some tables in my database that already contain saved data, but I can not update this data. I have the method below that performs the insertion of a new item in the table if the table does not have the item, if it has the data that is...
asked by 11.06.2014 / 22:48
1
answer

Convert SQL to LINQ

I have the following table CREATE TABLE 'ultimaposicaorastreadores' ( 'Id' CHAR(36) COLLATE utf8_bin NOT NULL DEFAULT '', 'Serial' BIGINT(20) NOT NULL, 'DataGps' DATETIME NOT NULL, PRIMARY KEY USING BTREE ('Id', 'DataGps'), KEY 'serial_idx' US...
asked by 11.01.2018 / 17:32
1
answer

Linq Return all records when ID is NULL

Inquiry: retorno = tarefaRep.GetAll(c => c.status == 0 && c.id_empresa == idEmpresa && c.id_cliente.ToString().Equals(idCliente)...
asked by 16.08.2017 / 22:29
1
answer

Too much trouble putting up an update with linq

I have done some updates with linq without problem. but the way my code is, I'm having trouble. What's the rule: 1) I have a screen where I make some report requests. Soon I can have n requests in progress. 2) These requests, I fill in som...
asked by 10.11.2015 / 11:47
2
answers

When concatenating in LINQ I get error

I made this LINQ. In the concatenation between DDD and phone number, which I call phone1, it is flicking. var agendamento = ( from pdv in db.T_PDV from tarefa in db.T_TarefaParceiro.Where(trf => trf.CNPJ == pdv.CNPJ).DefaultIfEmpt...
asked by 16.06.2014 / 20:54
0
answers

doubts with linq to entities

What would be the query in linq to entities: SELECT COUNT(cont) qtde_resp , pergunta , resposta FROM pesq_respostas WHERE id_pesquisa = 9 AND Tipo IN ('Intervalo', 'SimNao') GROUP BY pergunta...
asked by 06.12.2018 / 18:45
2
answers

Are there any differences between First and Single? [duplicate]

Are there any differences between First and Single? Are the two queries returned the same? And what about performance between the two is the same? Which of the two expressions is best to use?     
asked by 12.11.2016 / 20:07