Questions tagged as 'linq'

1
answer

Error accessing array indexes inside a LINQ expression

I am doing a query to search all the meteorologies with a certain date, but when executing the following error occurs: An exception of type 'System.NotSupportedException' occurred in EntityFramework.SqlServer.dll but was not handled in user co...
asked by 13.11.2016 / 18:19
1
answer

I would like to verify in the customer registry if the code you entered already exists. How do I do?

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AtFinal { class Program { struct Cliente { public int cod_cli; public...
asked by 25.08.2016 / 05:41
1
answer

Linq - Relationship with 3 tables

Good morning. In my project (C # MVC), I need to query with three tables, being: TabCollection 1 - N TabVolume and TabVolume 1 - N TabAuthor Example: IneedtodisplaytheViewasfollows: The first difficulty is to create this query...
asked by 28.06.2016 / 17:46
1
answer

Problem to query within second Dropdown

Always enter the ajax error: error: function (ex) { alert('Failed to retrieve vigararias.' + ex); } Screen Error:    Failed to retrieve cheaters. [object Object] View: <script type="text/javas...
asked by 15.01.2016 / 13:24
1
answer

Problems with Linq XML using .net namespace

I'm using a namespace when I create my xml, but xmlns is also appearing in the below-root tag, this is damaging to me, how can I make xmlns stay in the root tag (TLote_GNRE)? Here is the code: Dim xDoc As New XDocument(New XDeclaration("1.0",...
asked by 28.12.2015 / 13:00
1
answer

pick up customer with certain types of purchases

I have these tables:    Sales: SalesList (int) PK, SalesDate (DateTime), QdeItem (Decimal),   Sales Value (Decimal) .IDItem (FK), CustomerID (FK)       Item: IDItem (int) PK, Description (Varchar), ValueItem (Decimal)       Client: Customer...
asked by 30.03.2015 / 16:28
1
answer

Load variable with Lambda expressions traversing a list

First I made this code: for (int i = 0; i < vlstAcessos.Count - 1; i++) { if (vlstAcessos[i].DsURLTransacao == "frmANAAguardeProcesso.aspx") transacaoANA =...
asked by 10.03.2015 / 13:15
1
answer

Linq does not return data. There is data in the table and I return by query

I tried to make a LINQ very similar to my query. This is my query. select * from PDV where tipo_PDV = 'R' and UF = 'DF' and Cidade = 'BRASILIA-DF' This is my LINQ var resultado_rede_descricao = (from _pdv in db.PDV...
asked by 02.10.2014 / 13:56
1
answer

Get Model in the View with values coming from the database

I have this class: public class MontaArvoreAcao { public int IDRuptura { get; set; } public DateTime DataRuptura { get; set; } public int IDMotivo { get; set; } public string Motivo { get; set; } public int IDOrigem { get;...
asked by 15.09.2014 / 13:37
1
answer

Write fk shortly after pk is generated with entity

I have a system and in this system there are some tables that are associative. As soon as I write to the DB the main table, I need to ensure that the new PK generated is written to three other tables, but you have to ensure that it is generated....
asked by 28.08.2014 / 18:34