Hi I am using Abp Framework with .net 7 and I have this service that has one to many relationship
in the dto of the entity i have list and when I send rquest from swagger to this sevice i get this error
The instance of entity type 'B' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values.
This is my model
`
public class A: AuditedAggregateRoot
{
public required string Name { get; set; }
public virtual ICollection Bs{ get; set; } = new List();
}
public class TaxAddressIdentity : AuditedAggregateRoot
{
public required string Phone { get; set; }
public required Guid AId { get; set; }
public virtual A A { get; set; }
}
`
And this is my dto
`public class CreateUpdateADto: EntityDto
{
public string Name { get; set; }
public ICollection Bs{ get; set; }
}`
And this is the service
`public interface IAAppService :
ICrudAppService<
ADto,
Guid,
AGetListInput,
CreateUpdateADto,
CreateUpdateADto>
{
}
public class AAppService : CrudAppService,
IAAppService
{
}`
And this is the mapping i am using in side the file ProjectNameApplicationAutoMapperProfile
CreateMap();
CreateMap(MemberList.Source);
can you give me any hekp please? i try every thing but still git the same error
19 August, 2023
18 August, 2023
Search for Jobs on LaraJobs from Raycast
Programing Coderfunda
August 18, 2023
No comments
Search LaraJobs is a Raycast extension for searching open positions instantly and navigating to the job listing from your command launcher.
The post Search for Jobs on LaraJobs from Raycast appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
---
17 August, 2023
Laravel transactions: Why and how to use them with real-life use cases
Programing Coderfunda
August 17, 2023
No comments
16 August, 2023
Laravel Volt / Folio Beta 5 is out, now with named routes
Programing Coderfunda
August 16, 2023
No comments
Discover Laravel Folio's route naming and multiple Volt blade directives.
The post Laravel Volt / Folio Beta 5 is out, now with named routes appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
---
Shorten URLs in Your Laravel App with the Cuttly Package
Programing Coderfunda
August 16, 2023
No comments
Cuttly Service is a Laravel Package that provides a convenient wrapper to the Cuttly API, a URL shortener service.
The post Shorten URLs in Your Laravel App with the Cuttly Package appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
---
15 August, 2023
Digging Into Livewire 3 Forms
Programing Coderfunda
August 15, 2023
No comments
14 August, 2023
The Laracon AU 2023 schedule is here
Programing Coderfunda
August 14, 2023
No comments
The schedule for the last Laracon of 2023 is here for your perusal and delight.
The post The Laracon AU 2023 schedule is here appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
---
13 August, 2023
why getElementById It returns different every time in console
Programing Coderfunda
August 13, 2023
No comments
I'm new in js and i'm wondering why every time getELementById() returns different in console
for example :
index.html :
The message
script.js :
let h1Elem = document.getElementById("header");
console.log(h1Elem);
result in console for sometimes :
The message
and sometimes :
h1#header
accessKey
:
""
align
:
""
ariaAtomic
:
null
ariaAutoComplete
:
null
ariaBrailleLabel
:
null...
By definition of W3School I expect getElementById() it to return an element with a specified value, but sometimes it doesn't




