From 12fef7cbaf2073f9cc349ed765ea140be0259d8e Mon Sep 17 00:00:00 2001 From: Paweł Bernaciak Date: Sat, 21 Oct 2023 11:55:33 +0200 Subject: Basic API auth and Google login --- backend/Elements.Data/ApplicationContextFactory.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 backend/Elements.Data/ApplicationContextFactory.cs (limited to 'backend/Elements.Data/ApplicationContextFactory.cs') diff --git a/backend/Elements.Data/ApplicationContextFactory.cs b/backend/Elements.Data/ApplicationContextFactory.cs new file mode 100644 index 0000000..b8e4ebd --- /dev/null +++ b/backend/Elements.Data/ApplicationContextFactory.cs @@ -0,0 +1,15 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; + +namespace Elements.Data; + +public class ApplicationContextFactory : IDesignTimeDbContextFactory +{ + public ApplicationDbContext CreateDbContext(string[] args) + { + DbContextOptionsBuilder optionsBuilder = new(); + optionsBuilder.UseSqlite("Data Source=elements.db"); + + return new ApplicationDbContext(optionsBuilder.Options); + } +} \ No newline at end of file -- cgit v1.2.3