public ProfessionalProfileController() { _context = new AppointmentsDb.Models.AppointmentsDbContext(); _unitOfWork = new AppointmentsDb.Pattern.UnitOfWork(_context); _mapper = new AppointmentsDb.MapperStart.Automapper_Startup().StartAutomapper(); _professionalQueries = new ProfessionalQueries(_unitOfWork, _mapper); _linkingKeyQueries = new LinkingKeyQueries(_unitOfWork, _mapper); }
public CompanyLocationGroupsController() { _context = new AppointmentsDb.Models.AppointmentsDbContext(); _unitOfWork = new AppointmentsDb.Pattern.UnitOfWork(_context); _mapper = new AppointmentsDb.MapperStart.Automapper_Startup().StartAutomapper(); _companyQueries = new CompanyQueries(_unitOfWork, _mapper); _accessQueries = new AccessQueries(_unitOfWork, _companyQueries, _mapper); _companyLocationGroupQueries = new CompanyLocationGroupQueries(_unitOfWork, _mapper, _accessQueries, _companyQueries); }
public UnitOfWork(AppointmentsDbContext context) { _context = context; }
/// <summary> /// Patient Repository /// </summary> /// <param name="dbContext"></param> public AppointmentRepository(AppointmentsDbContext dbContext) { _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); }
public GenericRepository(AppointmentsDbContext context) { this._context = context; this.dbSet = context.Set <TEntity>(); }
public ProfessionalsRepository(AppointmentsDbContext context) : base(context) { }
public CompanyLocationGroupsRepository(AppointmentsDbContext context) : base(context) { }
public CompaniesRepository(AppointmentsDbContext context) : base(context) { }
public AppointmentsRepository(AppointmentsDbContext context) : base(context) { }
public GenericRepository(AppointmentsDbContext context) => this.context = context;
public AppointmentsRepository(AppointmentsDbContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, AppointmentsDbContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseCustomExceptionHandler(loggerFactory); app.UseHsts(); } app.UseHttpsRedirection(); app.UseApiVersioning(); app.UseSwagger(); app.UseCustomSwaggerUI(); AutoMapper.Mapper.Initialize((map) => { map.CreateMap <User, UserDto>().ReverseMap(); map.CreateMap <UserDto, UserUpdateDto>().ReverseMap(); map.CreateMap <InsertAppointmentDto, Appointment>().ReverseMap(); map.CreateMap <Appointment, AppointmentInsertDto>().ReverseMap(); map.CreateMap <AppointmentWithDetailsDto, Appointment>().ReverseMap(); map.CreateMap <AppointmentWithDetailsDto, InsertDetailsAppointmentDto>().ReverseMap(); map.CreateMap <AppointmentsClientDto, AppointmentsClient>().ReverseMap(); map.CreateMap <AppointmentsClient, AppointmentWithDetailsDto>().ReverseMap(); map.CreateMap <AppointmentWithDetailsDto, AppointmentsClient>().ReverseMap(); map.CreateMap <AppointmentsClient, InsertDetailsAppointmentDto>().ReverseMap(); map.CreateMap <InsertDetailsAppointmentDto, DetailsAppointments>().ReverseMap(); }); app.UseMvc(); }