Initial efcore migration and updates to make sure upserting novels (mostly) works. still need to do chapter handling

This commit is contained in:
2022-07-14 23:12:12 -04:00
parent 5402923e9f
commit 5337e7ccb8
25 changed files with 962 additions and 64 deletions

View File

@@ -1,12 +1,19 @@
using DBConnection;
using DBConnection.Extensions;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using WebNovelPortalAPI.Extensions;
using WebNovelPortalAPI.Scrapers;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddDbServices(builder.Configuration);
builder.Services.AddControllers();
builder.Services.AddScrapers();
builder.Services.AddControllers().AddNewtonsoftJson(opt =>
{
opt.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
});
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();