Questions tagged as 'linq'

1
answer

Many-to-many Relationship Query with LINQ to Entities

I've created a database that has two tables called Teachers and Courses . A teacher can teach in many courses and a course can have many teachers. I've created the Teacher Courses table to match both. When using the Entity Framework wizard...
asked by 09.12.2016 / 23:54
1
answer

C # Entity DbSet with DDD?

I have an application C# MVC with DDD and in repository I'm making the call like this: return DbSet.Include(i => i.Cliente).FirstOrDefault(a => a.ProcessoId == processoId); DbSet-> is in repositoy...
asked by 08.12.2016 / 20:44
1
answer

LINQ Return from list has all records repeated

I'm having problems performing a select (using LINQ) in a View in SQL Server 2012. The values stored in the database are as below: ID_Acomp ID_Pessoa Nome Data 26 300 MONTEIRO 01-01-2016 27 300...
asked by 14.10.2016 / 21:21
1
answer

LINQ with multiples ON in OR condition?

I'm encountering a problem using LINQ , I'm not very aware of how it does. I have the following code: (from BEN in repositorioBEN.RetornaTodos() join CON in repositorioCON.RetornaTodos() on BEN.Handle equals CON.Handle join APO i...
asked by 04.10.2016 / 16:48
1
answer

Modify generic method to merge information into classes

I am a first-time sailor with EntityFramework and am working with a USUARIO class that inherits from PESSOA . There are other classes like PESSOATIPO , PESSOAFISICA , PESSOAJURIDICA , etc., the problem is that w...
asked by 06.11.2016 / 15:00
1
answer

Join multiple values of type IQueryable

I'm receiving from my View an array of values with the days of the week. Sunday, Monday, etc. I want to compare this array with a string attribute of my database and save it to a variable of type "IQueryable". And go adding the contents of the t...
asked by 18.04.2016 / 12:50
1
answer

Query n: m using the Entity Framework

My problem with doing a "many-to-many" query. Receiving a View ID. In other words, I get an id from the selected cheater.  1 Catechesis has a list of parishes and 1 Parish has a list of Catecheses; A List of parishes has "1" truncheon. I get th...
asked by 20.01.2016 / 17:03
1
answer

Nothing value in a query to an xml tag using linq .net

I have the following xml: <ns1:TRetLote_GNRE xmlns="http://www.gnre.pe.gov.br" xmlns:ns1="http://www.gnre.pe.gov.br"> <ns1:ambiente>1</ns1:ambiente> <ns1:situacaoRecepcao> <ns1:codigo>100</ns1:codigo>...
asked by 14.01.2016 / 18:28
0
answers

Problem in TextBox to do autocomplete

I can not get into the query method to return the nomes and id´s of the person. View: <script type="text/javascript"> $(document).ready(function () { }); $("#AutoComplete").autocomplete({ source: fun...
asked by 26.01.2016 / 16:43
1
answer

listing filter in 2 MVC tables

I have 3 templates: Pessoa , Catequizando and Inscricao . I want to make a query that returns the Name of the person where CatequizandoID = PessoaID that will appear in a dropdown in the view CriarInscricao I...
asked by 07.12.2015 / 19:16