All Questions
5,443 questions
0
votes
0
answers
30
views
Implementing Many-to-Many Relationship Between Projects and Questions in Razor Pages
When I want to add a question to my project in the project section, I want to be redirected to the questionFilter.cshtml page with the project's ID. After that, I want to add and save the questions I ...
-1
votes
3
answers
75
views
Unable to delete Employee record using LINQ
I am trying to delete a record from Employee table based on EmpId which is the primary key (EmpId is also a foreign key for table Salary) using LINQ in asp.net web Api. But I am getting an error which ...
1
vote
2
answers
121
views
Filtering data within date range based on record data is always timing out using EF Core. Am I doing something that causes such poor performance?
I have a test which many records over time. I am using Postgresql to store these tests and records and I want to be able to search for tests that have records that fall within a certain time range.
A ...
1
vote
1
answer
55
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 ...
0
votes
0
answers
40
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. ...
1
vote
2
answers
553
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 ...
0
votes
1
answer
49
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"
...
0
votes
2
answers
366
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....
0
votes
1
answer
151
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 =>...
0
votes
2
answers
89
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
// ...
0
votes
0
answers
62
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
{
...
0
votes
2
answers
126
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 ...
0
votes
0
answers
103
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 ...
0
votes
0
answers
52
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 ...
0
votes
1
answer
185
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 ...