mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-06 00:36:39 +00:00
Unit of Work removed. Save done in the Repositories. Proj, Tickets & AppUsers Repo done.
This commit is contained in:
parent
d5d5d58866
commit
e59676d04a
4 changed files with 5 additions and 5 deletions
|
|
@ -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<AppUser> GetUser(Guid id)
|
||||
|
|
|
|||
|
|
@ -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<Project> Get(int id)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace TicketManager.Data
|
|||
// .Include(p => p.Notes)
|
||||
// .Include(p => p.Files)
|
||||
// .Include(p => p.Creator)
|
||||
.AsNoTracking();
|
||||
;
|
||||
}
|
||||
|
||||
public override async Task<Ticket> Get(int id)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ namespace TicketManager
|
|||
services.AddDbContext<AppDbContext>(options =>
|
||||
options.UseSqlite(Configuration.GetConnectionString("Sqlite")));
|
||||
services.AddScoped<IProjectRepository, ProjectRepository>();
|
||||
services.AddScoped<IAppUserRepository, AppUserRepository>();
|
||||
services.AddScoped<ITicketRepository, TicketRepository>();
|
||||
services.AddControllers()
|
||||
.AddNewtonsoftJson(options =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue