platformplatform / PlatformPlatform

Alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
https://platformplatform.github.io
MIT License
253 stars 26 forks source link

Ensure updating an entity marks it as tracked in Entity Framework change tracker #607

Closed BlueBasher closed 2 weeks ago

BlueBasher commented 2 weeks ago

Summary & Motivation

Resolve issues with updating entities within the RepositoryBase class in Entity Framework where changes were not persisting to the database if the entity was both created and updated within the same scope. By explicitly marking the entity as tracked upon update, this change ensures that Entity Framework’s change tracker recognizes the modifications, facilitating accurate change detection and persistence within the database.

Checklist

linear[bot] commented 2 weeks ago

PP-225 Entities are not saved when adding and updating in the same scope

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud