Add-Migration InitialCreate throws an exception, but is successful
When I run Add-Migration InitialCreate it successfully creates the EF classes. But it also throws the following exception: PM> Add-Migration InitialCreate -context TrackingDbContext Build started... Build…
ASP.NET problem with saving quizzes to a SQL database
I have a problem with my application namely I want to create the possibility to create dynamic quizzes. Currently I have a problem related to saving the created quiz with questions to the database. No matter if I want to create a new one or edit the one…
How to Enable Lazy Loading in a Blazor Project
I'm working on a Blazor project and I need to enable lazy loading. Can someone provide guidance on where and how to enable lazy loading in my project? Here's the link to my project repository: https://github.com/shujamughal/Sukhdari
Partial in Ef Migration
How can I add properties from the Main project to the Domain project's OrderItem? I tried adding a CS file directly in the main project, but migration gave me an error saying "[InverseProperty] attribute on property 'OrderItem.Order' is not valid.…
Avoiding Duplicate Inserts with Entity Framework
Hello everyone and thanks for the help in advance. I am developing an Asp.Net Core application where a user inputs various items within an order I'm trying to prohibit duplicate inserts. The record being added has approximately 17 columns. Many of…
How do we access a non-static variable without the need for instantiation? Entity Framework - ASP. Net Core
In the EFStoreRepository class, I have a variable of StoreDbContext type(context) StoreDbContext class and Products field inside it are not static. but I can call Products without instantiating the StoreDbContext class like a static field. How do we…
Entity framework generated SQL is different from 2.2 to 7
I recently upgraded a .NET core 2.1 web app to .NET 7 with upgrading EntityFrameworkCore to 7.0.1. a statement that use "Include" is now producing Sql queries with LEFT JOIN whereas with 2.1, they produce a mix of LEFT and INNER joins. …
How to integrate email confirmation of user accounts in an ASP.NET core MVC and Entity Framework web app?
0 I am new to web app development and recently used ASP.NET Core 3.1 MVC and Entity Framework in Visual Studio 2019 to create a web app using the individual accounts authentication. Currently, I have the website setup in which when a new user…
Looking for a detailed resource to build a Multi-Tenant ASP.Net Core Application using EntityFramework and ASP.NET Identity
I am looking to build a Multi-Tenant Web Application using ASP.Net Core along with EntityFramework, SQL Database, and ASP.net Core Identity. I am Looking for a detailed resource from Microsoft.
Establishing SSL trust to SQL Server with an AWS Lambda (Linux Client)
Hey all. I'm trying to connect to a SQL Server 2019 instance from an AWS lambda. I'm using a self-signed certificate for the SQL instance. Our lambda is using Entity Framework Core 7.0.5 in .NET 6 (also tested Microsoft.Data.SqlClient 5.1 with the same…
sql server localdb 2012 lost data without permission
Hi Dears, I'm using Entity Framework core 6.0.9 with WPF C# in SQL Server LocalDB v11.0. I have problems, Some record deleted without user permission. for example I inserted 13 record into Payment table in 2023/10/11 and I had them until 2023/10/14 11:56…
内存占用率很高,但任务管理器却没有显示是什么进程。
Windows10x64,16G内存, 电脑开机后占用约30%,一分钟后内存占用率达到80%左右,但任务管理器没有占用内存过高的程序。 使用poolmon查看,得知是CTNP占用内存过高,运行 c:>findstr /m /l /s CTNP *.sys,没有答案。 Tag Type Allocs Frees Diff Bytes Per Alloc CTNP Nonp 2315 ( …
upload multiple images asp.net core 6
i have three model the parnt model named books and child model named charts and BookImage the realtionship one to many the books model have multiple images come from charts and BookImage, the proplem i am facing when upload the image and displaying in my…
EF Core 6 - Why it is NOT Nullable?
Hi, Here is my entity; public class OrderDetail { public int Id { get; set; } [Required] [MaxLength(100)] public string ProductCode { get; set; } [Required] …
probleme mise a jour windows server 2019
bonjour, j'ai un probleme de mise a jour sous Windows Server 2019 mon serveur de domaine apres l'installation des mise a jour , j'ai recu deux messages d'erreurs j'ai besoin de votre aide svp 1- 2023-09 Mise à jour cumulative pour .NET Framework 3.5,…
System Reflection with EF Core OnModelCreating not working anymore
I have been using system.reflection.assembly.GetExecutingAssembly() for a while to pull in EF Core Context configurations for years. But now all of a sudden i am having nothing but issues with the system using my configuration files. It seems i have…
Scaffold-DbContext probleme authentication integrated security
Hello I want scaffolding my azure sqserver database, but when i run this command : Scaffold-DbContext "Server=MydataBase.database.windows.net;Database=dev-base;Integrated security=true;Authentication=Active Directory Integratd;User…
Doing Left Join with 3 tables using EF Core - multiple on condition
Hi, This is my sql query. SELECT [ID],[MachineName], b.Target_Date, b.Job_Name1, c.StopReasonStart, c.StopReasonEnd FROM [OEEDashboard].[dbo].[Machine] a left join AllMachines b on a.ID = b.MachineID left join OeeDetailsAll c on a.ID…
Entity framework configuration to add sql connection to my AKS Application
Previously I used Azurepodidentity to connect sql with my application running in AKS . Right now i am moving to the workload identity. my cs file need to modify for starting sql connection. I could not find proper documentation from Entity Framework code…
EF Core logging issue
I installed Microsoft.Extensions.Logging.Debug according to the tutorial and wanted to see how each query statement of ef core is converted into sql. And added the following code in Context: public partial class MyDbnContext : DbContext { …