Convert to new Core 3.0 using declarations
This commit is contained in:
parent
b0fec23a51
commit
1b6c577044
20 changed files with 324 additions and 381 deletions
|
|
@ -10,20 +10,20 @@ namespace DataLayer
|
|||
{
|
||||
public static int BooksWithoutDetailsCount()
|
||||
{
|
||||
using (var context = LibationContext.Create())
|
||||
return context
|
||||
.Books
|
||||
.Count(b => !b.HasBookDetails);
|
||||
}
|
||||
using var context = LibationContext.Create();
|
||||
return context
|
||||
.Books
|
||||
.Count(b => !b.HasBookDetails);
|
||||
}
|
||||
|
||||
public static Book GetBook_Flat_NoTracking(string productId)
|
||||
{
|
||||
using (var context = LibationContext.Create())
|
||||
return context
|
||||
.Books
|
||||
.AsNoTracking()
|
||||
.GetBook(productId);
|
||||
}
|
||||
using var context = LibationContext.Create();
|
||||
return context
|
||||
.Books
|
||||
.AsNoTracking()
|
||||
.GetBook(productId);
|
||||
}
|
||||
|
||||
public static Book GetBook(this IQueryable<Book> books, string productId)
|
||||
=> books
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue