I have list of models that are attached to a product model, insert is working, but when updated Entity is only updating the product model and ignoring the relat
I am unable to add the Deal entity because Buyer and Seller are referencing the same city "City1". I work with detached entities here because I receive the whol
I recently came across AddPooledDbContextFactory concept as part of my NET 5 self-education piece and am keen to implement it properly. However, I am not sure h
I recently switched my database from SQL Server to MySQL. I am still using Entity Framework 6 to do CRUD operation in database. When I was using SQL Server as b
I have implemented as suggested here to handle included columns on indexes using EF v3.1.5: https://mindbyte.nl/2017/12/26/Create-indexes-with-included-columns-
I would like to change reference to db table depends on model, which would be send by user. For example: I have 3 types (A,B,C) of devices and 3 tables (tableA,
I did default Megration with User model, added only my two custom properties. EF created standard flow of tables. And my AspNetUsers table As you can see User
.Net 6.0, EF, Asp.Net Core I'm trying to interrupt my web server's startup if the connection to the db could not be established. I'm thinking that the natural p
My first steps in C# are horrible. Now I'm trying to install Entity Framework. For doing that, I just go to the NuGet package manager, I type "Entity" and try t
i am trying to implement repository pattern in mvc. but I am stuck. I want to return related data. I have two classes , tbl_Account (contains users )and tbl_Cou
I am trying to add a new Template to an existing Client, but when I try to add the Template with an existing ClientID, it instead adds a new Template with a new
var countryCode = new SqlParameter("@countryCode", SqlDbType.VarBinary); var byteArray = Encoding.UTF8.GetBytes(dto.Country); countryCode.Value = byteArray; var
I want to view the edmx diagram like below an example of how it is viewed on windows visual studio I have tried looking at Microsofts documentations regarding
I want to view the edmx diagram like below an example of how it is viewed on windows visual studio I have tried looking at Microsofts documentations regarding
I'm using EF core TPH inheritance to model some data and I'm trying to write a query that will query across different subtypes. My current attempt at writing a
I'm trying to create a many to many relationship in entity Framework Core using Fluent API Here is my first model: MyCalculationSelector.cs public int Sort
In C# My Sql Entity Framework 6 Insert is return exception Cannot add or update a child row: a foreign key constraint fails (portaldb.masterselectionhistory, C
I am using an Enumeration class like this public class SizeUnit : Enumeration { public static SizeUnit Inch = new SizeUnit(1, nameof(Inch)); public static
I had some changes in my ef context and I added new Migraions dotnet ef migrations add changed98112601 then I run the below command dotnet ef database upd
SCENARIO If I split the Entity Framework linq query to evaluate an IQueryable first and after try to include some properties, the value of AccessGroupAccessPoin