Skip to content

Instantly share code, notes, and snippets.

@MufidJamaluddin
Last active July 15, 2020 13:59
Show Gist options
  • Save MufidJamaluddin/7b7133803f4b78a3a1c017bf046bea55 to your computer and use it in GitHub Desktop.
Save MufidJamaluddin/7b7133803f4b78a3a1c017bf046bea55 to your computer and use it in GitHub Desktop.
namespace IssueTracker.Services
{
public class TicketServices : ITicketServices
{
private ITicketRepository TicketRepository { get; }
private ITransactionRepository TransactionRepository { get; }
private ILogger<TicketServices> Logger { get; }
private IssueTrackerDbContext DbContext { get; }
public TicketServices()
{
this.Logger = new TicketServiceLogger();
this.DbContext = new IssueTrackerDbContext();
this.TicketRepository = new TicketRepository();
this.TransactionRepository = new TransactionRepository();
}
...
}
}
namespace IssueTracker.Models.Repositories
{
public class TicketRepository : ITicketRepository
{
private IssueTrackerDbContext DbContext { get; }
public TicketServices()
{
this.DbContext = new IssueTrackerDbContext();
}
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment