Files
YouTubeViewers/YouTubeViewers.EntityFramework/YouTubeViewersDesignTimeDbContextFactory.cs
2022-08-22 15:56:12 +02:00

19 lines
598 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YouTubeViewers.EntityFramework
{
public class YouTubeViewersDesignTimeDbContextFactory : IDesignTimeDbContextFactory<YouTubeViewersDbContext>
{
public YouTubeViewersDbContext CreateDbContext(string[] args = null)
{
return new YouTubeViewersDbContext(new DbContextOptionsBuilder().UseSqlite("Data Source=YouTubeViewers.db").Options);
}
}
}