Esempio n. 1
0
        public static async Task <T> CreateEntity <T>(IIssueTrackerDbContext context, T entity) where T : class
        {
            // insert initial entity
            entity = context.Add(entity).Entity;
            await context.SaveChangesAsync(CancellationToken.None);

            return(entity);
        }
Esempio n. 2
0
 public CreateIssueTypeCommandHandler(IIssueTrackerDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public GetAllProjectsQueryHandler(IIssueTrackerDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public DeleteProjectParticipantsCommandHandler(IIssueTrackerDbContext context)
 {
     _context = context;
 }
 public LoginCommandHandler(IIssueTrackerDbContext context, IMapper mapper, IOptions <AppSettings> appSettings)
 {
     _context     = context;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
 }
 public CreateProjectCommandHandler(IIssueTrackerDbContext context, IMapper mapper, IMediator mediator)
 {
     _context  = context;
     _mapper   = mapper;
     _mediator = mediator;
 }
Esempio n. 7
0
        public CreateProjectCommandValidators(IIssueTrackerDbContext context)
        {
            _context = context;

            RuleFor(x => x.Key).Must(UniqueKey).WithMessage("This key already exists.");
        }
Esempio n. 8
0
 public UpdateProjectParticipantsCommandHandler(IIssueTrackerDbContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public DeleteIssueTypeCommandHandler(IIssueTrackerDbContext context)
 {
     _context = context;
 }
Esempio n. 10
0
 public CreateUserCommandValidators(IIssueTrackerDbContext context)
 {
     _context = context;
     RuleFor(x => x.Email).Must(UniqueEmail).WithMessage("This Email already exists.");
 }