Layout.cshtml @{ var menus = (IEnumerable<WebApplication.Models.TopMenu>)ViewBag.menus; } <div class="col-md-8"> <!-- Menu Partia
I have a main table "SALES" and two secondary tables "PRODUCTS" and "SERVICES", I need to select only the records in "SALES" that contain some product or servic
I am only about 3 days into using MongoDb and C# driver so be gentle. ;-) I have a MongoDB query working with AsQueryable. I would like to use the collection.Fi
I have a lot of data as response not parsed and also, so you can see what is in the response. But I want all the scores from the table results, the query filter
Considering I have 2 list (listaProduto1 and listaProduto2), both with same properties, but with different values. I need the result merge both lists, but it mu
I am wondering what the difference between IQueryable, List, IEnumerator is and when I should use each one? For instance when using Linq to SQL I would do some
I have the following recordset for a given School (i.e., ABC in this example) , I need to groupby on Class and Activity and take the first row . Then I need to
I got a linq lambda select code that works before I added the Select index overload. Before, I got the list of records but I need the index which I use to assig
I'm trying implement the follow query in LINQ, but I don't find solution: SQL: SELECT COUNT(*) AS AmountMonths FROM (SELECT SUBSTRING(CONVERT(NVARCHAR(12), pay_
Net core application. I have below query in my application var result = sourceProposal.Quotes .Where(x=>x.QuotationId == sourceQuoteId) .FirstO
Considering I have 2 list (firstList and secondList), both with same properties, but with diffent values. I need the result merge both lists, but it must consi
I have a table like Date Balance A Balance B --------------------------------- 2022.03.01 100 200 2022.03.01 200 500 2022.03.02 300
The raw SQL uses correlated subquery for single table, any possibility to translate this with single LINQ Query? SELECT * From dbo.Products AS P1 WHERE SalePric
I have a data set (ex. 1, 1, 4, 6, 3, 3, 1, 2, 2, 2, 6, 6, 6, 7) and I want to group items of the same value but only if they are next to each other minimum 3 t
I have this code: IQueryable<WinnerClassExtend> dataList = from Class in _context.AllClass join Winner in _context.AllWinners on Class.ClassId equals Win
Net application. I have one entity with child entities. I have to filter based on child entity values. For example in the below query, var sourceProposal = pro
Simple scenario : var d = new Dictionary<int, List<int>>(); Dictionary<int, IEnumerable<int>> d2 = d.ToDictionary( kv => kv.Key,
I have an IEnumerable with fields Name(string) and Amount(ulong). I want to get a single LINQ query to group those elements by Name and then get their sum and a
I have list say list of customers and inside each list there is another list of orders Class Customer { int ID, string Name List<Order> orders } Class Or
I am working on .NET CORE 6 application along with Entity Framework CORE 7. I have class where I have written LINQ script. This is async method. I am not sure w