Questions tagged as 'linq'

0
answers

C # & MongoDb - How to make filter in child document?

I'm starting my adventures in MongoDB and I'm having a problem specifically with document filtering. The template for my application: public class MatrizCurricular { [BsonId] public ObjectId _id { get; set; } public string Cur...
asked by 03.03.2018 / 21:51
2
answers

Connection methods in ASP .NET [closed]

I am a beginner in ASP and C #. I have doubts and this is the real reason to ask here. Before you can read how the question policy is, understand that I am a beginner and really need help. I have a question of how to connect to my ASP applic...
asked by 21.02.2018 / 17:43
1
answer

SubmitChanges () does not update data in Linq

internal bool AlterarCargo(string login, string Categoria) { db.Log = Console.Out; //tentei ativar para ver se encontrava o erro mas não ajudou nada. var categoria = from x in db.Categorias where x.Categorias == Catego...
asked by 12.02.2018 / 12:59
2
answers

Convert string to DateTime in LINQ

I have a model where all fields are string . I want to convert to DateTime and Double For this I created a new model public class CPUStats { public DateTime Data { get; set; } public Double? Disco { get; s...
asked by 16.03.2016 / 14:41
1
answer

Questions about how to identify an object in the collection

I'm studying C # and I'm having some doubts .. The project I'm doing is a fictitious gallery system that registers Artists, Trustees, and Art Pieces. I have created the abstract class "Persons" that contains the first and last name of the per...
asked by 05.02.2018 / 20:38
2
answers

SQL / LINQ vs. Data to feed graphic

I am trying to generate a query in VS2015 with Linq (here, I exemplified in SQL, to speed up my tests directly in the bank) that returns the data grouped and counted from 6 months ago, it happens that in some of the months there is no data soon...
asked by 05.12.2017 / 13:16
1
answer

C # join 3 tables using Linq?

I'm getting to learn C # and I'm picking up on some points. I have 3 Tables. Follow the models public class Tag { [Key] public int ID_Tag { get; set; } [Required(ErrorMessage = "Preencha o Nome")] [MaxLength(100)] pu...
asked by 08.11.2017 / 04:46
1
answer

Does Linq generate this ID? How to recover?

I'm doing an automation using Selenium WebDriver and I'm getting all the elements of a Table. I used the code below: var qntd= driver.FindElements(By.XPath("//*[@id='dataTable']/tbody/tr")).Skip(3); I then realized that each element gene...
asked by 27.07.2017 / 15:34
0
answers

Query 3 tables using LINQ and return a Json object

How do I query the database between 3 tables using LINQ returning a JSON object following the Structure below? Public class PedidoGrupo{ int id ; string nome ; public virtual List<Pedido> pedidos ; } Public class Pedid...
asked by 25.05.2017 / 21:51
1
answer

Filter a NULL type in lambda expression or linq

Hello, my A entity has an attribute of type long that can be NULL making a relationship with entity B , making a filter with a Lambda expression with this attribute to bring up all records that are different from NULL it does not recogniz...
asked by 06.04.2018 / 13:37