Jiry_XD
Jiry_XD
Explore posts from servers
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
❤️
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
I really appreciate it!
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Thanks for explaining and taking time to help me
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Ooh gotcha I totally understand now 🙂
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Oh you meant I also could do it in the modelbuilder without defining it as a nav property?
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
here
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Just one more question, it may be a nooby question, what do you mean here when referring to a backing field for nav properties is that the Id or?
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Gotcha thanks, I appreciate the help really much.
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
I see yes in this case its true. The ReadOnlyCollection is not necessary here. It was actually a lecturer of mine who suggested this readonly list (for another entity class but I also implemented it here)m but it has no use case other than avoiding thrown Exceptions.
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Yes one to many relationship, not required relationship
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Like OfficeId in this case you mean or?
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
How do you normally set this constraint?
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
I used it so I couldn't insert doubles
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Its probably because of the IReadOnlyCollection no?
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Yeah that's one odd thing
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Its now removing it correctly
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Okay that seems to have worked
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
Gotcha its not enough to set Office nullable? I thought ef would infer that 😅
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
public class SalesPerson : Entity
{
public required string Name { get; set; }
public int OfficeId { get; set; }
public Office? Office { get; set; }
}
public class SalesPerson : Entity
{
public required string Name { get; set; }
public int OfficeId { get; set; }
public Office? Office { get; set; }
}
64 replies
CC#
Created by Jiry_XD on 11/26/2024 in #help
✅ EF Core doesn't stop tracking list items.
But I don't get why its not throwing an error there then
64 replies