Questions tagged as 'linq'

1
answer

Left Join in LINQ

I have the representation of 2 classes. 1st class: using System; using System.Runtime.Serialization; namespace WebService { [DataContract] public class PessoaDados { private Nullable<int> id; private str...
asked by 30.05.2017 / 15:20
1
answer

Save IEnumerableT inside a parent entity with LINQ

Dear, I have the following classes: public class Foto { [Key] public int Id { get; set; } [StringLength(500)] [Required(ErrorMessage = "Obrigatório")] public string Nome { get; set; } public int Item...
asked by 14.01.2016 / 14:36
1
answer

How to call Linq method in View?

Good morning everyone. my question is this, I have the following method in my model: public IQueryable GetConsulta() { var q = (from c in Datacontext.Tabela1 join b in Datacontext.Tabela2 on c.CodClase equals b.CodClase...
asked by 26.08.2016 / 11:29
1
answer

SubQuery with Linq

I need to query Linq for an object called Client. This object has a relationship with another object, which is a List of phones. For each of the phones, there is a type: 'Casa', 'Comercial', 'Recado' , etc. I want to bring everything in...
asked by 15.02.2016 / 18:45
3
answers

Formatting with UNION and LINQ in C #

I'm using the following code to bring a list of companies with the CNPJ formatted into the DataGridView: dgv.DataSource = db.pessoajuridica .Select(d => new { d.idPessoa, d.nome, d.cnpj }) .AsEnumerable...
asked by 19.03.2016 / 16:56
1
answer

Make a Select inside a dropdown with help of jquery

I can not script for this to work. I have to search for the second Dropdown and save the ID of the second dropdown to do the Post ID on the DB Controller: This Controller will seek the dioceses of the first dropdown. public ActionResult Get...
asked by 14.01.2016 / 17:24
1
answer

Filter by group and minimum value

I have the following table: ********************************* * IdPessoa * DataVen * Observ * * 10000000 * 01/01/15 * Teste1 * * 10000001 * 01/01/15 * Teste2 * * 10000000 * 01/01/12 * Teste3 * * 10000001 * 01/01/13 * Teste4 * * 10000001...
asked by 10.08.2015 / 16:09
1
answer

How do I add more than two conditions to an Expression dynamically?

I need to pass a list of Expressions as a parameter and create the 'Ands' as dynamically as possible. So, whenever I add a new Expression to the list, I will have to change the class that mounts Expression as well. Para...
asked by 21.08.2015 / 15:47
1
answer

Search SQL database in a text saved by TinyMCE

I'm using TinyMCE for text editing on my site. When I search for a word with an accent. Eg: análise , the query does not count because the bank is saved in HTML an&aacutelise . I'm using ASP.Net MVC with SQL Server.     
asked by 17.08.2015 / 17:21
1
answer

Doubt filter with linq, ASP NET MVC

I'm having a doubt on a filter using Linq, I have a critical object Within Critical has an ienumerable I need to return a list of critics that the status of the last moveocritica is equal to 2 But the code below is giving error var Criticas =...
asked by 05.03.2015 / 03:23