Skip to main content

All Questions

0 votes
1 answer
63 views

Json parse error while using /login method from WebApiCore Identity provided by [email protected]

While configuring authentication and autorization with web.api endpoints and using: \packages\microsoft.aspnetcore.identity.entityframeworkcore\8.0.6 \packages\microsoft.entityframeworkcore.sqlserver\...
Pedro Figueiredo's user avatar
-3 votes
1 answer
36 views

why don't Show EF Core 6, AppDbContext onModelCreating in modelbuilder.HasDefaultSchema("Schema name"); [closed]

why dont Show EF Core 6, AppDbContext onModelCreating in modelbuilder.HasDefaultSchema("Schema name"); i tried different methods, I almost asked the AIs too, ChatGPT, Bing etc. but somehow ...
Muhammadabdulloh Komilov's user avatar
0 votes
1 answer
54 views

ASP.NET Entity Framework Core - one-to-many relationship foreign key constraint blocking PUT request

I have a relationship on project and employee entities. I need have added a one-to-many relationship using Entity Framework Core (one employee have many projects, but one project has one employee). ...
salinda yasas's user avatar
0 votes
1 answer
81 views

Complex queries in Entity Framework Core

I have these two entities in EF Core: public class Chat { public int Id { get; set; } public string SessionId { set; get; } = string.Empty; // Could be sessionId or anything that indicate the ...
Mohammad Zohar's user avatar
0 votes
1 answer
43 views

How to format JSON for a POST request for a One-to-Many Entity using EF Core?

I have an ASP.NET Web API with Performer and Venue Models. I am attempting to create a Booking Model, wherein a Performer has many bookings, a Venue has many bookings, and a Booking has one Performer ...
user25355771's user avatar
0 votes
2 answers
58 views

Is the speed of the query I write to the table with a lot of data normal?

I have a table named "Applications" where I keep track of the applications made by my candidates to vacancies. Now, I need to write a statistical query for HRs, and when an HR logs in, I ...
Elchin's user avatar
  • 41
0 votes
1 answer
40 views

Optimisitic Concurrency Timestamp Error, Timestamp does not have a default value

I have an entity class as follows public class Order { public long Id { get; set; } //other properties [Timestamp] public byte[] Timestamp { get; set; } } I also have the following ...
Josh's user avatar
  • 1,888
0 votes
0 answers
25 views

System.Invalid The instance of entity type 'LecAttendanceEntity' cannot be tracked because another instance with the keyvalue is already being tracked

[HttpPost("PostLecAttendance")] public async Task<IActionResult> PostLecAttendance([FromBody] LectureAttendanceRequestDto request) { if (!ModelState.IsValid) { return ...
Chaitanya Kalunkhe's user avatar
0 votes
1 answer
57 views

Trouble saving workout data to database using Entity Framework Core and ASP.NET Web API

I'm encountering difficulties when attempting to save workout data to a database using Entity Framework Core and ASP.NET Web API. I have a Workout class defined with properties such as WorkoutId, ...
dancho's user avatar
  • 91
0 votes
1 answer
73 views

Returning Entity Results with Includes from Web Api

I'm fairly new to Entity Framework Core. I have a data structure like this: Books contain many Chapters. Chapters contain many PageNotes. My entity query in my API controller is like this, and through ...
Scottish Smile's user avatar
-1 votes
1 answer
199 views

why can't I download Microsoft.EntityFrameworkCore.SqlServer to my DAL (WEB API) in c#?

I need some help. I want to write an ASP.NET Web API in C# (I created a project on the .NET framework), but first I need to connect it to my database in SQL Server. In order to connect to the database,...
ברוריה ענהאל כהן's user avatar
4 votes
5 answers
124 views

Compare ComplexType EFCore in Where clause

I have a complex type named MSISDN which looks like below: public class MSISDN { public string NDC { get; set; } public string CC { get; set; } public string SN { get; set; } ...
RezaNoei's user avatar
  • 1,479
0 votes
1 answer
94 views

LINQ could not be translated. Call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'

How can I compare a list sent to me for filtering with a list in my database? I have a List called CandidateLanguage in my candidate entity. And I get a list called LanguageSkills from outside to ...
Elchin's user avatar
  • 41
0 votes
1 answer
56 views

How can I create an entity by using generic repository pattern

I used a generic repository interface IGenericRepository<T> where T:class One of data access method is this post method Task<T> AddEntityAsync(T Entity), I also created add Dto class for ...
Adegbola Tunji 's user avatar
0 votes
2 answers
71 views

Is the speed of the query I wrote for statistics normal?

I want to know if this query I wrote for statistics is fast. It currently works in 3 seconds with the data and query I wrote below. Now I have a user table. Those whose role is Hr can create a vacancy....
Elchin's user avatar
  • 41

15 30 50 per page
1
2 3 4 5
18