From 9e06c343c1fa8641e764469cf6421a18929abc44 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Sat, 21 Aug 2021 21:15:25 -0600 Subject: [PATCH] Don't check if values have changed when updating the database. --- ApplicationServices/LibraryCommands.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ApplicationServices/LibraryCommands.cs b/ApplicationServices/LibraryCommands.cs index 6643a50a..d544a77f 100644 --- a/ApplicationServices/LibraryCommands.cs +++ b/ApplicationServices/LibraryCommands.cs @@ -164,11 +164,7 @@ namespace ApplicationServices var udi = libraryBook.UserDefinedItem; - if (udi.Tags == newTags) - return 0; - // Attach() NoTracking entities before SaveChanges() - udi.Tags = newTags; context.Attach(udi).State = Microsoft.EntityFrameworkCore.EntityState.Modified; var qtyChanges = context.SaveChanges(); if (qtyChanges > 0) @@ -191,11 +187,7 @@ namespace ApplicationServices var udi = libraryBook.UserDefinedItem; - if (udi.BookStatus == liberatedStatus) - return 0; - // Attach() NoTracking entities before SaveChanges() - udi.BookStatus = liberatedStatus; context.Attach(udi).State = Microsoft.EntityFrameworkCore.EntityState.Modified; var qtyChanges = context.SaveChanges(); if (qtyChanges > 0) @@ -218,11 +210,7 @@ namespace ApplicationServices var udi = libraryBook.UserDefinedItem; - if (udi.PdfStatus == liberatedStatus) - return 0; - // Attach() NoTracking entities before SaveChanges() - udi.PdfStatus = liberatedStatus; context.Attach(udi).State = Microsoft.EntityFrameworkCore.EntityState.Modified; var qtyChanges = context.SaveChanges();