Questions tagged as 'linq'

3
answers

Get C # class property

I need to get all the properties of a class that is of type class. Ex: public class Pessoa{ public virtual int? Id { get; set; } public virtual MinhaClasse1 prop1{ get; set; } public virtual MinhaClasse2 prop2{ get; set; } }...
asked by 29.07.2016 / 16:33
1
answer

Data Annotation - error ratio 1: 1

I'm trying to make a 1 to 1 ratio. Apparently it would be something simple but my system is getting lost in this relationship; It does not make a mistake, but the relationship is wrong: Model: public class CieloRecorrencia { [Key...
asked by 04.04.2016 / 21:27
1
answer

Which method corresponding to the FindAll of the List is used in a DataTable

I have the following select below: var Filhos = FluxoWorkflow_ .FindAll(N => N.IdPai.GetValueOrDefault() == dr.IdFluxoWorkflow); I've had to change my typed class to a DataTable I'm just not getting it to change th...
asked by 16.02.2016 / 17:23
2
answers

Send a list of data in a viewbag and receive a foreach in the view

The query data is correct, but I can not return the data to the view. Controller: var disponib = (from d in db.Disponibilidade join c in db.Catequista on d.CatequistaID equals c.CatequistaID where c.Catequist...
asked by 23.03.2016 / 16:15
2
answers

Retrieve data from a SQL Linq query with Join

In the presentation layer I call a consLaboratorio method that is in a separate namespace where all data access is performed. This method returns an object MiddleOneReturn with: error_code (0-if run without errors) and execution...
asked by 21.11.2014 / 21:06
2
answers

Use lambda with Ado.Net

Using sqldatareader and ado.net, can you use lambda with linq or just lambda or just linq? This is not a multiple question, but linq and lambda are always together, so the various "?", Ok?     
asked by 05.06.2014 / 20:36
1
answer

Bank table does not update

I have some tables in my database that already contain saved data, but I can not update this data. I have the method below that performs the insertion of a new item in the table if the table does not have the item, if it has the data that is...
asked by 11.06.2014 / 22:48
1
answer

Query with LINQ, trying to perform a RIGHT JOIN

I need to make the following query through LINQ, using the given tables: You must return all vehicles where the "Type" has the "PART" field equal to "true", the connection of the "Vehicle" table with the "Type" table is done through the "Mode...
asked by 14.10.2014 / 15:30
1
answer

Make a foreach that does not repeat the same data

I have this foreach, in a table with more than 5000 records. There are only 6 types of business unit. I would like in foreach and linq, when a type of un appears, it loads and then no longer repeats it, ie, it loads another different one and so...
asked by 22.09.2014 / 16:50
1
answer

Something wrong with references using two layers in the Entity

I made an example in Entity 5.0 and with 1 layer worked perfect. Now I have separated in UI and DA L, but this is giving error. The same page that worked on the DAL layer when done in UI is giving error. I t...
asked by 20.03.2014 / 18:10