Пример #1
0
 public static LibraryBook GetLibraryBook_Flat_NoTracking(this LibationContext context, string productId)
 => context
 .LibraryBooks
 .AsNoTrackingWithIdentityResolution()
 .GetLibraryBook(productId);
Пример #2
0
        //// 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();
Пример #3
0
 public static List <LibraryBook> GetLibrary_Flat_WithTracking(this LibationContext context)
 => context
 .Library
 .GetLibrary()
 .ToList();
Пример #4
0
 public static Book GetBook_Flat_NoTracking(this LibationContext context, string productId)
 => context
 .Books
 .AsNoTracking()
 .GetBook(productId);
Пример #5
0
 public static LibraryBook GetLibraryBook_Flat_NoTracking(this LibationContext context, string productId)
 => context
 .Library
 .AsNoTracking()
 .GetLibraryBook(productId);