Skip to main content

All Questions

Tagged with
1 vote
1 answer
49 views

How to delete the rows of datatable1 having different ID while compare with the datatable2

Given the first data table having master data and the second table having the needed data IDs, I need to delete the rows from the first table which are not present in the 2nd table. I am trying to use ...
Dev's user avatar
  • 1,681
0 votes
0 answers
30 views

Search implemented using LinqKit predicateBuilder working fine in the local but not working in the dev build

I have implemented a search functionality using the LinqKit predicate builder. It is working fine in the local environment and when it is published to a folder the same functionality is not working. ...
sid's user avatar
  • 1
1 vote
2 answers
120 views

Multiple tables query with repository pattern

I have an ASP.NET Web API project, and have implemented repository and unitOfWork patterns. I currently have a big SQL query that I want to implement in code, it includes a lot of tables and joins. My ...
RifloSnake's user avatar
0 votes
1 answer
46 views

Fetch the Name based diff version for same Service and Function

Here is my Json object . [ { "Id": 1, "Name": "Asset A", "Version": 1, "Function": "Song", "Service": "Song" ...
Pinky's user avatar
  • 59
0 votes
3 answers
135 views

Invalid LINQ Expression ... could not be translated

I don't know why, when I execute this LINQ request, this exception is returned : System.InvalidOperationException: The LINQ expression '__ids_0 .Contains(StructuralTypeShaperExpression: Patron....
Victor Nardella's user avatar
0 votes
1 answer
56 views

Collection is read-only Exception with EfCore Include method

I am encoutering error System.NotSupportedException: Collection is read-only when selecting Film aggregate from sql server with EfCore like this: var film = await dbContext.Films .Include(f =&...
DVL's user avatar
  • 192
0 votes
2 answers
78 views

array in ascending and descending order in C# using LINQ

In this i have write two linq queries For Ascending order For Descending order i have done this in one way can you guy's suggest me to the another method for knowledge if exists. Here is the code // ...
Rohan Sharma's user avatar
0 votes
0 answers
57 views

Linq cannot translate property with conversion?

I have found many similar questions, but in none of them have I found the solution to my problem. In an ASP.NET Web API application I have the following Entity: public class User : BaseEntity { ...
l.diazborg's user avatar
0 votes
2 answers
70 views

How to join tables from multiple dbcontexts in one ViewModel?

So I've got two dbcontexts, to get data from various tables and I want to join them in a ViewModel. I know I should probably use .Join(), but I wondered if something like this was also possible: My ...
Gogo Dev's user avatar
  • 126
0 votes
0 answers
98 views

Filtering query in C# based on dictionary within each entity

I have a query coming from the database and I want to filter the query based on a column in the table "ExtraProperties" which is written in a json format in Sql but when getting the query it ...
Ali Mustafa's user avatar
0 votes
0 answers
48 views

Data Context is error when adding in ASP.Net

I'm not sure if this is the right section to post so please whoever it may be, don't be angry with me as I'm desperate and stuck I received this error message when loading my application. I am using ...
Victor Hernando's user avatar
0 votes
1 answer
47 views

Entity Framework skip multiple condition in where clause when any param can be null or empty

I am trying to fetch the records from db where any param can be null or empty, this is what I have, but not giving me the correct result. From the five params any one can be null but one must have ...
Nilanjan's user avatar
1 vote
1 answer
65 views

How can i make my Query faster using a Groupby with LINQ

I created a Query, it is pretty fast but my table will have 100k+ or even a 1 million records. With 100k rows it takes 5s to load and that is to long. I know using First() is also querying, but I can'...
TwanCS's user avatar
  • 11
0 votes
1 answer
61 views

.NET EF Core Automapper ProjectTo filtering is not working

I have the following piece of code var taskDTOs = await _repo.GetQueryable<TaskStatus>() .Where(s => s.Tasks.Any(t =>t.CompanyId == _userContext.CompanyId && t.UserId == ...
Nour Mawla's user avatar
0 votes
2 answers
89 views

How Can I dynamically create an "OR" LINQ query based on input parameter conditions

My problem is a bit more complicated, so I have simplified it with the below example.   Let's say I have a simple list of Integers. I receive two condition input parameters in my function which tell ...
just-an-average-programmer's user avatar

15 30 50 per page
1
2 3 4 5
364