Questions tagged as 'linq'

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
1
answer

Linq to SQL - Dynamic ordering by column index

I'm using a component called datatables.js ( link ) to display my tables and it has the ServerSide strong>, which I call, in Ajax, my list from somewhere. It sends the ordering, meaning by parameters. It sends the Index column to be sorted....
asked by 11.12.2015 / 20:34
1
answer

How do I retrieve the filters of a query?

Hello. Is it possible to find out which filters, computers, etc. were used in a query? Example: public class Program { class Produto { public int Id; public string Nome; public Produto(int id, string nome)...
asked by 06.10.2015 / 20:41
1
answer

how to do a select count using Linq C #

I need to convert this snippet of SQL code to Linq C #. I've been able to convert almost all of the code. SELECT COUNT(Q.ID_QUALIFICACAO) AS CONHEC_ESPECIFICO FROM QUALIFICACAO Q INNER JOIN...
asked by 02.11.2015 / 20:39
1
answer

Select two attributes from two different tables in a view

I have the model (superclass) Pessoa and the model Aluno public partial class Pessoa { public Pessoa() { this.Escola = new HashSet<Escola>(); } [Key] public int PessoaID { get; set; }...
asked by 24.08.2015 / 17:25
1
answer

How to load only the ID attribute in Many-To-One Relationship in EF?

I have two Many-To-One relationships in this class ( usuario and projeto ): public Atividade() { Projeto = new Projeto(); StatusAtividade = EStatusAtividade.NaoIniciado; TipoAt...
asked by 17.07.2015 / 16:40
1
answer

How to get data from a specific field in an XML using LINQ VB.net/C#

I have the following xml: <det nItem="1"> <prod> <cProd>01554</cProd> <xProd>La Aslan Velour 0001 </xProd> <NCM>55111000</NCM> <CFOP>5102</CFOP>...
asked by 17.07.2015 / 17:25
1
answer

jLinq - Perform dynamic query picking values from 'Select'

I'm using jLinq to search for a Array of Objetos I would like this search to be dynamic, taking the values of Selects My example: <select id="firt"><option>Select 1</option></select> <selec...
asked by 24.06.2015 / 20:03
2
answers

How to return all records in a table

In my context I have a File table, and another version of the file, so I did with the entity to return a file, and only one version of the file: internal Arquivo GetArquivo(string termo) { using (var ctx = new GEDEntities())...
asked by 05.02.2015 / 13:26
2
answers

Batch deletion using Linq

I have a table, which is used in my Model.edmx , with the following fields: ID ID_PROJETO ID_ITEM VALOR How to convert the SQL below into a Linq expression? DELETE FROM TB_RECEITA WHERE ID_PROJETO = 100 AND ID_ITEM = 5     
asked by 05.01.2015 / 21:03