diff --git a/Data/AppUserRepository.cs b/Data/AppUserRepository.cs index a281ec8..66a2cde 100644 --- a/Data/AppUserRepository.cs +++ b/Data/AppUserRepository.cs @@ -16,8 +16,7 @@ namespace TicketManager.Data .Include(p => p.Assignments) .ThenInclude(a => a.Project) .ThenInclude(p => p.Tickets) - .Include(p => p.Edits) - .AsNoTracking(); + .Include(p => p.Edits); } public async Task GetUser(Guid id) diff --git a/Data/ProjectRepository.cs b/Data/ProjectRepository.cs index 675fe9c..ec8dede 100644 --- a/Data/ProjectRepository.cs +++ b/Data/ProjectRepository.cs @@ -15,8 +15,7 @@ namespace TicketManager.Data .Include(p => p.Assignments).ThenInclude(a => a.User) .Include(p => p.Tickets) .Include(p => p.Manager) - .Include(p => p.Files) - .AsNoTracking(); + .Include(p => p.Files); } public override async Task Get(int id) diff --git a/Data/TicketRepository.cs b/Data/TicketRepository.cs index 272adda..e142c8f 100644 --- a/Data/TicketRepository.cs +++ b/Data/TicketRepository.cs @@ -19,7 +19,7 @@ namespace TicketManager.Data // .Include(p => p.Notes) // .Include(p => p.Files) // .Include(p => p.Creator) - .AsNoTracking(); + ; } public override async Task Get(int id) diff --git a/Startup.cs b/Startup.cs index 9c41d9c..3da6027 100644 --- a/Startup.cs +++ b/Startup.cs @@ -38,6 +38,8 @@ namespace TicketManager services.AddDbContext(options => options.UseSqlite(Configuration.GetConnectionString("Sqlite"))); services.AddScoped(); + services.AddScoped(); + services.AddScoped(); services.AddControllers() .AddNewtonsoftJson(options => {