This commit is contained in:
2023-07-23 20:27:23 +03:00
parent d0cdaa85b6
commit 96eca795ab
62 changed files with 2934 additions and 847 deletions
@@ -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();
}