fix
This commit is contained in:
@@ -11,7 +11,7 @@ public class ItemRepository : AppRepository<Item>, IItemRepository
|
||||
.Include(x => x.Motions)
|
||||
.Include(x => x.Category)
|
||||
.Include(x => x.ItemGlobal)
|
||||
.Where(x => x.Category.UserId == userId)
|
||||
.Where(x => x.Category!.UserId == userId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ItemRepository : AppRepository<Item>, IItemRepository
|
||||
.Include(x => x.Motions)
|
||||
.Include(x => x.Category)
|
||||
.Include(x => x.ItemGlobal)
|
||||
.Where(x => x.Category.UserId == userId && x.CategoryId == categoryId)
|
||||
.Where(x => x.Category!.UserId == userId && x.CategoryId == categoryId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ItemRepository : AppRepository<Item>, IItemRepository
|
||||
.Items
|
||||
.Include(x => x.ItemGlobal)
|
||||
.Where(x => x.Category!.UserId == userId && x.ItemGlobal.Name.Contains(term))
|
||||
.OrderByDescending(x => x.Motions.Count())
|
||||
.OrderByDescending(x => x!.Motions!.Count())
|
||||
.Take(limit)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user