Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest PUT handles updates #270

Open
donaldgray opened this issue Feb 13, 2025 · 0 comments
Open

Manifest PUT handles updates #270

donaldgray opened this issue Feb 13, 2025 · 0 comments
Labels
refined Identify refined tickets in backlog SOW6

Comments

@donaldgray
Copy link
Member

If manifest has "items" - as-is

If has "paintedResources" the process is effectively a create (again) bearing in mind:

  1. Batch history should be maintained
  2. CanvasPainting rows in DB should reflect what we've just received.

Not sure how best to do (2) - something like the following might work, assuming PK values can easily be used to inform create/update/delete commands:

// get manifest with CanvasPaintings
var manifest = dbContext.Manifests.Include(m => m.CanvasPaintings).Single(m => m.Id = manifestId);

// replace CanvasPaintings
manifest.CanvasPaintings = theCanvasPaintingsFromPayload;

// let EF change tracking figure it out
dbContext.SaveChanges();
@donaldgray donaldgray added the refined Identify refined tickets in backlog label Feb 14, 2025
@sarahos sarahos added SoW5 SoW5 SOW6 and removed SoW5 SoW5 labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refined Identify refined tickets in backlog SOW6
Projects
None yet
Development

No branches or pull requests

2 participants