Questions tagged as 'linq'

1
answer

Error using Split within Select

Why does the following exception occur when using Split within a Select in a IQueryable ?    The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities. I've been able to solve the problem using...
asked by 20.05.2016 / 00:50
1
answer

How to return concrete classes, with filled navigation properties, through Linq queries?

Following this question: Query by Linq and Lambda getting range of options per sub-query. How do I get a closer result than simple? Where, however, my template grew to one more class (resulting in another table), the class Tela , I'm t...
asked by 23.10.2014 / 18:44
1
answer

Error in query in bank with Linq

Good evening! I'm trying to perform a query on a mysql table, using linq, and present that result in a gridview to the user. I have the table below: I'm not looking for all the columns in this table, just a few for this I'm using the code be...
asked by 09.06.2014 / 01:46
2
answers

Compare DayOfWeek in an ASP MVC query

I'm trying to make a query where I check if the week day is the chosen one to create a list of data that loads in a ViewModel. Query: var plan = db.Servicos.Where(s => (TecnicoResp.HasValue ? s.NumTransportado == TecnicoResp.Value...
asked by 18.02.2014 / 17:47
1
answer

Transcribe SELECT for query expression LINQ

How can I reproduce the following query for LINQ expression? SELECT nome_empresa, Count(funcionarios.id_funcionario) AS qtdfuncionario, Count(id_colaborador) AS qtdcolaboradores FROM empresas JOIN func...
asked by 29.07.2015 / 16:08
2
answers

Query by Linq and Lambda getting range of options by sub-query. How to get a result closer to the simple?

Given the following classes: MenuRaiz : public class MenuRaiz { public MenuRaiz() { Menus = new List<Menu>(); } [Key] [DatabaseGenerated(DatabaseGeneratedOption.None)] public int Id { get; set; }...
asked by 22.10.2014 / 14:45
1
answer

Problems with logic to bring data from a list or table

I made several posts here and solved almost every problem. However I understood that the problem was in the logic that I set up to bring the result. I know I'm asking a lot, but I'm trying and I realize there's something missing in me to solve t...
asked by 22.09.2014 / 21:15
1
answer

Convert LINQ to Dapper query

I have a LINQ query where I get the complete data. For performance reasons, I'm converting the query and using Dapper . I have the following entities: public class Cliente { public int ClienteId { get; set; } public strin...
asked by 28.06.2015 / 19:16
2
answers

SQL query with 2 subselects for query lambda (or linq)

select fieldA from TableA where fieldA = 459249 and fieldB in ( select FieldC from TableB where FieldD in ( select cte.FieldE from TableC cte where key= 'ABDC123' ) ) I got to the point below, the pr...
asked by 11.07.2014 / 17:56
1
answer

How to do authentication in MVC application with linq?

I have a project in ASP.Net MVC and I am putting the authentification manually. Everything is going well, but I used as a reference an already ready project that uses the EntityFramework, but I want to use linq for my operations. The problem is...
asked by 28.05.2015 / 13:53