Created Woodpecker CI/CD deployment
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Created Dockerfile for packing up API and Web projects as Docker image
This commit is contained in:
18
API/YABA.Data/Context/YABABaseContextFactory.cs
Normal file
18
API/YABA.Data/Context/YABABaseContextFactory.cs
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
|
||||
namespace YABA.Data.Context
|
||||
{
|
||||
public class YABABaseContextFactory : IDesignTimeDbContextFactory<YABABaseContext>
|
||||
{
|
||||
public YABABaseContext CreateDbContext(string[] args)
|
||||
{
|
||||
var optionsBuilder = new DbContextOptionsBuilder<YABABaseContext>();
|
||||
optionsBuilder.UseNpgsql(args[0])
|
||||
.UseSnakeCaseNamingConvention()
|
||||
.UseQueryTrackingBehavior(QueryTrackingBehavior.TrackAll);
|
||||
return new YABABaseContext(optionsBuilder.Options);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user