public FeedbackController(MakerTrackerContext context, IMapper mapper, SendGridClient sendGridClient, MailSettings mailSettings, IConfiguration config) : base(context)
 {
     _mapper        = mapper;
     SendGridClient = sendGridClient;
     MailSettings   = mailSettings;
     Config         = config;
 }
Exemplo n.º 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, MakerTrackerContext db)
        {
            db.Database.Migrate();
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            if (!env.IsDevelopment())
            {
                app.UseSpaStaticFiles();
            }

            app.UseRouting();

            app.UseAuthentication();
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "api/{controller}/{action=Index}/{id?}");
                endpoints.EnableDependencyInjection();
                endpoints.Select().Filter().OrderBy().Expand();
            });

            app.UseSpa(spa =>
            {
                // To learn more about options for serving an Angular SPA from ASP.NET Core,
                // see https://go.microsoft.com/fwlink/?linkid=864501

                spa.Options.SourcePath = "ClientApp";

                if (env.IsDevelopment())
                {
                    spa.UseAngularCliServer(npmScript: "start");
                }
            });
        }
Exemplo n.º 3
0
 public static void Initialize(MakerTrackerContext context)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="NeedController"/> class.
 /// </summary>
 /// <param name="context">The database context.</param>
 /// <param name="mapper">The automapper.</param>
 public NeedsController(MakerTrackerContext context, IMapper mapper) : base(context)
 {
     _mapper = mapper;
 }
Exemplo n.º 5
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="MakerEquipmentController"/> class.
 /// </summary>
 /// <param name="context">The database context.</param>
 /// <param name="mapper">The automapper.</param>
 public MakerEquipmentController(MakerTrackerContext context, IMapper mapper) : base(context)
 {
     _mapper = mapper;
 }
 public InventoryController(MakerTrackerContext context) : base(context)
 {
 }
Exemplo n.º 7
0
 public GISController(IWebHostEnvironment env, MakerTrackerContext context) : base(context)
 {
     _env = env;
 }
Exemplo n.º 8
0
 public ProfilesController(MakerTrackerContext context, IConfiguration Configuration, IMapper mapper, ILogger <ProfilesController> logger) : base(context)
 {
     _configuration = Configuration;
     _mapper        = mapper;
     Logger         = logger;
 }
Exemplo n.º 9
0
 public AdminReportsController(MakerTrackerContext context, IConfiguration configuration, IMapper mapper) :
     base(context)
 {
     _configuration = configuration;
     _mapper        = mapper;
 }
 public InventoryController(MakerTrackerContext context, SendGridClient sendGridClient, MailSettings mailSettings, ILogger <InventoryController> logger) : base(context)
 {
     SendGridClient = sendGridClient;
     MailSettings   = mailSettings;
     Logger         = logger;
 }
Exemplo n.º 11
0
 public ApiBaseController(MakerTrackerContext context)
 {
     _context = context;
 }
Exemplo n.º 12
0
 public ProductTypesController(MakerTrackerContext context, IMapper mapper) : base(context)
 {
     _mapper = mapper;
 }