Questions tagged as 'linq-to-sql'

1
answer

Using elements like "Not Exists" and Sub Query in LINQ, LAMBDA EXPRESSION and Nhibernate

Good morning, I have a query to run in my database, but here in our projects we use Nhibernate as an ORM tool. I'm having difficulty passing this SQL query to a syntax used with NHibernate. The query is down: SELECT distinct a.NumContrO...
asked by 06.09.2018 / 14:09
0
answers

Union with different dataTypes Linq-to-entities

I'm trying to return a grid! with headers and values below. I'm trying to do this! void Main() { var ctx = dbContext; (from tQuestions in ctx.Questions select new { a1_1 = (Object)tQuestions.HeaderCreationD...
asked by 24.05.2018 / 18:28
0
answers

GridView and Linq to SQL

I'm trying to change data in a GridView using a DataSource Linq to SQL Context: I created a table in SQL: BancoID int Autoincremento Banknumber char (3) BankName varchar (30) I created a Linq to SQL class and it includes access to this tab...
asked by 02.07.2017 / 16:21
2
answers

doubts with linq to sql

Personal I have two tables, sale and sale Items: Sale: [Table("venda")] public class VendaModel { [Key] [Required] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int id_venda { get; set; } public DateTime dt...
asked by 05.07.2018 / 00:40
1
answer

How to perform a Left Join with LINQ C # using my SQL?

Example that works in SQL: select * from Doacoes inner join Projetos on Projetos.IdProjeto = Doacoes.IdProjeto left join Pedidos on Doacoes.IdDoacao = Pedidos.IdDoacao left join Recompensas on Pedidos.IdRecompensa = Recompensas.IdRecompensa...
asked by 07.12.2017 / 12:39