// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AuthorManagementContext context) { context.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); app.UseGraphQL <ISchema>(); app.UseGraphQLPlayground(); }
/// <summary> /// Constructor for the TransactionBehavior class. /// </summary> /// <param name="logger"></param> /// <param name="dbContext"></param> public AuthorManagementContextTransactionBehavior(ILogger <AuthorManagementContextTransactionBehavior <TRequest, TResponse> > logger, AuthorManagementContext dbContext) : base(logger, dbContext) { }
public AuthorRepository(AuthorManagementContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }