public static LibraryBook GetLibraryBook_Flat_NoTracking(this LibationContext context, string productId) => context .LibraryBooks .AsNoTrackingWithIdentityResolution() .GetLibraryBook(productId);
//// tracking is a bad idea for main grid. it prevents anything else from updating entities unless getting them from the grid //public static List<LibraryBook> GetLibrary_Flat_WithTracking(this LibationContext context) // => context // .Library // .GetLibrary() // .ToList(); public static List <LibraryBook> GetLibrary_Flat_NoTracking(this LibationContext context) => context .LibraryBooks .AsNoTrackingWithIdentityResolution() .GetLibrary() .ToList();
public static List <LibraryBook> GetLibrary_Flat_WithTracking(this LibationContext context) => context .Library .GetLibrary() .ToList();
public static Book GetBook_Flat_NoTracking(this LibationContext context, string productId) => context .Books .AsNoTracking() .GetBook(productId);
public static LibraryBook GetLibraryBook_Flat_NoTracking(this LibationContext context, string productId) => context .Library .AsNoTracking() .GetLibraryBook(productId);