mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-12 11:46:40 +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)
|
.Include(p => p.Assignments)
|
||||||
.ThenInclude(a => a.Project)
|
.ThenInclude(a => a.Project)
|
||||||
.ThenInclude(p => p.Tickets)
|
.ThenInclude(p => p.Tickets)
|
||||||
.Include(p => p.Edits)
|
.Include(p => p.Edits);
|
||||||
.AsNoTracking();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<AppUser> GetUser(Guid id)
|
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.Assignments).ThenInclude(a => a.User)
|
||||||
.Include(p => p.Tickets)
|
.Include(p => p.Tickets)
|
||||||
.Include(p => p.Manager)
|
.Include(p => p.Manager)
|
||||||
.Include(p => p.Files)
|
.Include(p => p.Files);
|
||||||
.AsNoTracking();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task<Project> Get(int id)
|
public override async Task<Project> Get(int id)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ namespace TicketManager.Data
|
||||||
// .Include(p => p.Notes)
|
// .Include(p => p.Notes)
|
||||||
// .Include(p => p.Files)
|
// .Include(p => p.Files)
|
||||||
// .Include(p => p.Creator)
|
// .Include(p => p.Creator)
|
||||||
.AsNoTracking();
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task<Ticket> Get(int id)
|
public override async Task<Ticket> Get(int id)
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ namespace TicketManager
|
||||||
services.AddDbContext<AppDbContext>(options =>
|
services.AddDbContext<AppDbContext>(options =>
|
||||||
options.UseSqlite(Configuration.GetConnectionString("Sqlite")));
|
options.UseSqlite(Configuration.GetConnectionString("Sqlite")));
|
||||||
services.AddScoped<IProjectRepository, ProjectRepository>();
|
services.AddScoped<IProjectRepository, ProjectRepository>();
|
||||||
|
services.AddScoped<IAppUserRepository, AppUserRepository>();
|
||||||
|
services.AddScoped<ITicketRepository, TicketRepository>();
|
||||||
services.AddControllers()
|
services.AddControllers()
|
||||||
.AddNewtonsoftJson(options =>
|
.AddNewtonsoftJson(options =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue