Questions tagged as 'linq-to-sql'

1
answer

Linq to sql with subquery

I have two tables, and I would like to get only the data from table A by filtering through the related table B. I would like to know how to write this query with Linq to Sql in C #. I've written the example below on Sql Server to make understand...
asked by 25.09.2017 / 21:26
1
answer

Function Linq does not return List

Hello, I have an application and it does not return a list that I make SELECT via Linq-to-Sql The error can be in the SELECT that linq-to-sql is doing. SELECT [Extent1].[Codigo] AS [Codigo], [Extent1].[NomeFantasia] AS [NomeFantasia], [Ext...
asked by 04.09.2015 / 01:24
1
answer

Catch a list in the View and move to the C #

I have 2 lists that come from the database, one from technician and one from suppliers. I can not get it from View and switch to Controller. And how to receive this list in the controller Followthecodebelow:ControllerpassinglisttoviewasViewB...
asked by 27.07.2017 / 03:22
1
answer

Linq to SQL - Dynamic ordering by column index

I'm using a component called datatables.js ( link ) to display my tables and it has the ServerSide strong>, which I call, in Ajax, my list from somewhere. It sends the ordering, meaning by parameters. It sends the Index column to be sorted....
asked by 11.12.2015 / 20:34
0
answers

List with repeated records via Linq

I'm trying to do a simple query with LINQ, and the code below is returning me repeated records in the first 5 rows of the list. var teste = (from p in db.VW_PAGAMENTO_RECEBIDO where p.ID_Pessoa == 23 select p).ToList(); When I run the SQL s...
asked by 08.06.2016 / 19:05
0
answers

Query using Firebird's SUBSTR with linq, queryOver, Criteria

Well, I need to create a query using the firebird "SUBSTR" function with linq, queryOver, or Criteria. I have option to create with HQL or SQL, but these would be my last options. Does anyone have an idea? Here is an example of the query. S...
asked by 10.05.2016 / 19:33
2
answers

ListView with an empty and editable column

PersonnelwantedtohaveemptyandeditablecellsinacolumnofaListViewthatpullsinformationfromtheSQLServerdatabasetomyproject.TopulltheinformationIuseLINQandIcanlistallthedataIwant.Theideais:whenthislistisloadedtheusercaneditthecellsofanewcolumn(Quanti...
asked by 15.05.2016 / 01:52
1
answer

Exporting the Listview to Excel (.xls) from a populated list by LINQ, WPF (C #) project?

Good ... I need to export the data of the Listview populated by the LINQ method of a SQL Database ... I can not get the Column Headers in Excel ... Can anyone help? Reference: link Export Class: using System; using System.Collecti...
asked by 17.07.2016 / 06:02
1
answer

Left Join statement in LINQ to entites

I tried to do a left join in LINQ as follows: (from opr in db.Operacao join vol in db.Volume on new { VOL_CODBAR = opr.OPR_CODBAR } equals new { VOL_CODBAR = vol.VOL_CODBAR } into vol_join from vol in vol_join.DefaultIfEmpty() select new {...
asked by 22.12.2014 / 18:10
1
answer

I need to get the value of the Navigation Properties

Friends, how do I display an information in my View through a navigation property, type: My View: <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-ho...
asked by 21.10.2018 / 15:10