I've been reading lately articles and documentation about deferred execution, LINQ, querying in general etc. and the phrase "object is enumerated" came up quite
I have a Linq query which is selecting 2 columns(that can be any 2 from all columns) dynamically based on some condition.I need to map the query result in to be
Global query filters are very handy when implementing tenant and soft deletion features. But my problem is is that when i write a query with joins, for instance
This is a bit more complex than other questions. I have a Model that encapsulates an IList. Within each IList item there are multiple Lists. This makes it VERY
I am combining 2 tables that I transferred to the dynamic model into 1 table in the cshtml part. And I want to sort that table by a column(OrderBy). How can I d
I'm using EF core TPH inheritance to model some data and I'm trying to write a query that will query across different subtypes. My current attempt at writing a
My entity has a computable geography::point column (represented by DbGeography type in code) When I call a .Distinct() method on query for this entity it adds O
I am using [adsisearcher] to grab AD User info because it's way faster than get-aduser. I am also trying to figure out how to add it into a hashtable or diction
Consider the following code (which is a simplified version of my actual code): static void Main(string[] args) { string[] data = { "one", "two", "three", "s
I have a page that displays all users in the table. The front end uses a class that is different from the database model. public class UserDetailsViewDto {
Im making a basic CSV Reader. Im sepparating the header from the contents using header and data. Now, my lists contain data of the type person.: public
What I have A list of objects with Id, DateStart and DateFinish. [ { Id: 1234567890, DateStart: new DateTime(), DateFinish: new Date
I have a list of incomplete product models. Everyone is missing an owner and a price. Can these deficiencies be filled with a single query to context? Without t
I have a parent-child structure in my db and I want to list them hierarchically n a C# program: id text parentid 1 A NULL 2 B NULL 5 a1 1 6
I am working on .NET Core 6 along with EF Core. I want to convert Customer and Order object that I have inside LINQ select to CustomerDto and OrderDto using Pro
I have relational data properties on my objects that I would like to access: public class Person { public ICollection<Address> Addresses { get; private
I wanted to create an IQueryable extension to allow other developers to group entities by minutely interval but also by custom group key result. My idea was to
I've got a question on LINQ Expression. I need to replicate the following lambda: var result = processRevisions OrderByDescending(pr => pr.CreatedAt) G
I have started to learn Linq recently. I came across a few inbuild methods like Min() and Max(). The working of these two methods is fine with int[]. But when i
So this is the query: from c in Contents join cs in DepartmentSharings on c.ContentId equals cs.ContentId select c.PrivateCategoryId.Value When I run this I