All Questions
285
questions
0
votes
0
answers
26
views
Need to order by list using row value using entity framework [duplicate]
I have data in following format as shown in the sample table data. I want to order by this data in ascending order for ND values.
Means like from ND1 to ND10.
I tried the following way:
return await ...
0
votes
0
answers
43
views
How to make efficient algorithm that I can use to display posts for a user, similar to how Facebook does it
i'm working on a project that that will work similar to facebook, in my app i have a Posts Entity that a user can add. Those posts are available for other users on thier wall (a page where user can ...
0
votes
2
answers
58
views
Filtering on related Entities
How can i filter and retrieve only the needed items in a related entity?
Eg. If the PurchaseTrans has items with 3 types of brands and i need only 1 type.. now it returns all the 3 brands if even 1 of ...
0
votes
1
answer
45
views
Why my Delete Cascade policy is not working Properly
I have 2 tables called Domain and Domain Theme. it has one to one relationship. Here the 2 model classes.
public class Domain
{
public int OrganizationDomainId { get; set; }
...
0
votes
2
answers
483
views
I'm receiving "Host can't be null" error when updating database in a .NET7 project with Postgresql database
I'd like to ask you for some help. I have a .NET7 project connected to the Postgresql database system, which works perfectly in Visual Studio on Windows, but there are some issues when I open it in ...
0
votes
1
answer
44
views
What should the key value be in postman to map to a collection that holds a FormFile? How can i map to IFormfile using postman
What im trying to do - Im building a endpoint with .net and the method holds a class called
TestRequest. And that class holds a collection of attachments. And a Attachment class holding a File and a ...
0
votes
1
answer
111
views
why EF Core Tools need to invoke Program.CreateHostBuilder() to create a migration?
I have a asp.net core solution that consists of two project: api project and data access project
To be able to create a migration on data access project. I have to install Microsoft....
0
votes
1
answer
59
views
How to replicate/duplicate tabels in sql server with row data?
i have 3 tables with master data A, B and C in an sql-server.
Based on user-requirements there is a need to replicate these tables, let call replica-tables AA, BB and CC - such that experiments can be ...
0
votes
1
answer
134
views
How to extend AspNetUserRoles table
I have a .NET application that uses EntityFramework 6.2.0 for creating and managing my database. I also have a class that inherits from IdentityDbContext.
I understand that upon issuing an initial ...
0
votes
0
answers
37
views
Set dynamic column name for same parameter of entity for different tables
I have a class Auditable which has four fields CreatedBy, CreatedDate... I have overridden the SaveChanges method to automatically populate the above data whenever an Entity is saved to the database ...
1
vote
2
answers
69
views
Variable display issue in Razor page in Blazor App
I'm learning Blazor. On my page the contents of the _persons list just flashes by when I click the Search button, is this variable being garbage collected? Thanks in advance.
@page "/"
@...
0
votes
1
answer
181
views
Foreign Key Constraint error when trying to update database, working with C# and ASP.NET Core, Entity framework
This is the error I'm getting:
Introducing FOREIGN KEY constraint 'FK_Battlestation_AspNetUsers_UserId' on table 'Battlestation' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION ...
-3
votes
1
answer
84
views
How to add value in database using Entity Framework Core
Model classes:
public class BulkAttendance
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public int EmployeeCategoryId { get; set; }
public int ...
0
votes
0
answers
258
views
How to avoid multi-threading issue with DbContext in ABP?
I am using aspnet boiler plate with .net core 3.1 project. I've a use case where I need to create separate threads for each service bus topic and then all threads will call a repo to get some data ...
0
votes
1
answer
80
views
Auto applied migrations using EF Core 7.0.14
When I make a new migration (Add-Migration Example) , and then I try to get all the migrations (Get-Migration) I find that the "applied" field is "True" without even using (Update-...