Resolve Issue With My C# Code

Đã Đóng Đã đăng vào 3 năm trước Thanh toán khi bàn giao
Đã Đóng Thanh toán khi bàn giao

I'm using EF with a code-first approach, this is what I have set-up:

public void Configure(EntityTypeBuilder<OrderLine> builder)

{

[login to view URL](l => new {[login to view URL], [login to view URL]});

}

but I'm getting the error

[login to view URL]: The instance of entity type 'OrderLine' can not be tracked because another instance with the same key value for {'OrderLineId', 'empId' } is already being tracked

If I check the database in the OrderLine table the orderNumber I'm pulling data for does not exist, however the empId exists in that table associated with a different orderNumber.

Do I need to change my Configure method for this?

Lập trình C# .NET

ID dự án: #27742451

Về dự án

5 đề xuất Dự án từ xa 3 năm trước đang mở

5 freelancer chào giá trung bình$31 cho công việc này

ganeshrasekar

I can do it

$30 USD trong 1 ngày
(23 Nhận xét)
4.7
anandan1995

I have a experience in asp.net, MVC, web API,Laravel,Php,,Java, Spring mvc,Hibernate, c#, SQL, entity framework,linq, razor view (Cshtl), html, Wordpress,Joomla,Shopify,Jstl,bootstrap,Angular JS, Jquery, Json,XML, repo Thêm

$35 USD trong 1 ngày
(27 Nhận xét)
4.5
fdjrodjevic

Hello! I am a ASP.NET and C# developer who have a lot of experience with it. I am top in this respects. I am here.

$30 USD trong 7 ngày
(0 Nhận xét)
0.0