aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--API/Database/DbRepository.cs3
-rw-r--r--Models/Interfaces/Database/IRepository.cs (renamed from API/Database/Interfaces/IRepository.cs)2
2 files changed, 3 insertions, 2 deletions
diff --git a/API/Database/DbRepository.cs b/API/Database/DbRepository.cs
index 5540104..b961a54 100644
--- a/API/Database/DbRepository.cs
+++ b/API/Database/DbRepository.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using Camera_Shop.Database;
+using Models.Interfaces.Database;
using Microsoft.EntityFrameworkCore;
namespace API.Database
@@ -37,6 +37,7 @@ namespace API.Database
{
return this._context
.Set<TEntity>()
+ .AsNoTracking()
.Take(count)
.AsAsyncEnumerable();
}
diff --git a/API/Database/Interfaces/IRepository.cs b/Models/Interfaces/Database/IRepository.cs
index 927e006..e38bb82 100644
--- a/API/Database/Interfaces/IRepository.cs
+++ b/Models/Interfaces/Database/IRepository.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
-namespace Camera_Shop.Database
+namespace Models.Interfaces.Database
{
public interface IRepository<TEntity>
where TEntity : class