C
C#

help

Net core 6 Web api update-add collections to a created entity [Answered]

Ggianmonky10/13/2022
I am trying to update an entity that has a collection, when creating it with 1 item in the collection it works, when editing that single item too, but when i'm editing and add one more to the collection it stops working I'm doing a foreach(var item in entity.collection) for this, I understand that as long as it's not deleting it shouldn't interfere with the foreach, the item already exists in the array so... One option is to delete all existing items in the db and create them anew on each edit, but there must be something better.
Mmikernet10/13/2022
Your question isn't doesn't make the problem particularly clear
but when (editing) I add one more it stops working
Not sure what that means exactly
Ggianmonky10/13/2022
but when i'm editing and add one more to the collection it stops working, I speak English the best I can XD
Mmikernet10/14/2022
Post some code or something because the problem is not clear from your question
UUUnknown User10/14/2022
2 Messages Not Public
Sign In & Join Server To View
AAccord10/19/2022
✅ This post has been marked as answered!

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
Adding a library [Answered]Hello. I very rarely work in the console, but now I've started doing so I've found myself needing toEF Core & Repository patternOur app was initially built using MongoDB and we implemented a repository layer over it. We then migPattern Matching to Check if 4 uint have the same valueIs there a shorter way so we dont have to check with equality operator for each combination?I can't get fetch body as plain string [Answered]```cs public async Task<JsonResult> GoogleSignin([FromBody] string googleToken) ``` ```js await fetcASP.NET vs generic .NET [Answered]So I've been using MSVS for some time and am confused as to which libraries that ASP.NET encompassesLine Renderer HelpI am trying to get this code to work There is no bullet in the map at the start of the game when theCSV Invalid Header Reading [Answered]I am currently a CSV with a header of "province;red;green;blue;name;x", however my program expects tDynamic settings (auto update)Hey! To put it very basic, I have a static class in my project `Constants` with a static property `SNot sure what I'm doing wrong but my Total Fare is messed up [Answered]Numbers don't add upAzure Appserice 502 when upload large file [Answered]I have config my local project to accept large and test swagger locally fine But when upload to appCan't access record members [Answered]I have a record that looks like this ```cs public readonly record struct Card(Suite suite, Rank rankSlash Command works but gives error? [Answered]Hi, I'm trying to make a Discord Bot in .Net 6 and my Slash Command works but after the command it gUnity 2 golf, ball doesn't stop rolling and... [Answered]So i call this func when ball goes out of camera range. the position gets reseted but the ball is stSource Generator For NuGet ReferencesHey, I have source generator project which reads metadata of dll references and via that informationHi I want to know about this in keyword used in the attached image. [Answered]I know "in" keyword when used with method parameters but I am unable to understand the same in this Debug azure app remotelyI have issue how to know properly server name to debug web app in azure remotely with attach to procHow to filter list so that if there are objects with same values in fields? [Answered]Is there a way to filter objects so that objects with same field values are not duplicated in a listHow to assert HttpResponseMessage content in unit test [Answered]Let's say I have 2 variable like this: ```csharp var result = await sender.SendAsync(request); var t