Questions tagged as 'linq'

0
answers

Cast to decimal in LINQ?

Since there is no Convert.ToDecimal() in SQL language, how could I transcribe a as decimal(18,2) in LINQ ? I've tried through decimal.Round() but it's not working. I have the following query in SQL : SELECT [nu_a...
asked by 26.04.2018 / 21:04
0
answers

Entity Linq query in many-to-many relationship

I inherited a bank that is untouchable ... Despite having some very "strange" things. For example I have the following situation that would represent a n-n relationship but the relationship does not actually exist. In other words, a nei...
asked by 09.12.2017 / 18:01
0
answers

Convert Anonymous Object [closed]

How can I convert an anonymous type object to a known class using Linq version 4 with Entity Framework in C #?     
asked by 24.08.2017 / 21:49
0
answers

What is the difference between LINQ search forms? [duplicate]

What's the difference between: var query = from s in db.DetailsRaWeb where s.cod_cli.Equals(Cod_Cli) && s.tag.Equals(TAG) select s; and this: query = query.Where(s => s.cod_cli.Equals(Cod_Cli) &...
asked by 25.07.2017 / 16:56
0
answers

Sort the contents of the MetroGridView by clicking on the Heder title of a given column

Hello everyone, I have a problem, which I have been fighting for some time now. I'm using in my application MetroFramework and linq, and I noticed that MetroFramework does not have certain properties or that they do not work as they should, or s...
asked by 05.06.2017 / 11:07
0
answers

How to use subqueries with LINQ Entity Framework?

I need to write the following query in the Linq Entity Framework. I'm having difficulty in the subquery part, where I need to accumulate the quantity field. SELECT ppc.[PedidoCompraId] ,ppc.[EAN] ,ppc.[Preco] ,ppc.[Quantidade] ,ppc.[Un...
asked by 26.04.2017 / 20:19
0
answers

Namespace error 'LinqToDb' could not be found

I downloaded Linq2Db.Firebird via Nuget and changed the file as instructed: <#@ template language="C#" debug="True" hostSpecific="True" #> <#@ output extension=".generated.cs"...
asked by 14.01.2017 / 21:00
1
answer

Query Linq C #

Good afternoon I have the following database structure: Tables: -User -Group - Permission And all relations N to N: User Group User Permission PermissionGroup I made a query to return the user, regardless...
asked by 30.01.2017 / 14:57
1
answer

Linq with 2 different context using inner join

I would like to query 2 different databases (2 Dbcontext) I have tried in several ways, one of them: I make a pre-query in the context DbMega to recover the officials var FuncionariosLinq = (from Colaborador in dbMega.Funcionarios...
asked by 17.03.2016 / 14:22
3
answers

Compare two querys

I have a query that returns only the catechizers that went to the event: var catequizandosCheked = (from cat in db.Catequizando where cat.Eventos.Any(e => e.EventoID == eventoID)...
asked by 16.05.2016 / 19:58