コード例 #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
ファイル: BookQueries.cs プロジェクト: tanitall/Libation
 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);