File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Sources/TelegramBot.ConsoleTest Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1+ using Microsoft . EntityFrameworkCore ;
2+
3+ namespace TelegramBot . ConsoleTest . Database
4+ {
5+ public class AppDbContext : DbContext
6+ {
7+
8+ }
9+ }
Original file line number Diff line number Diff line change 1- using TelegramBot . Builders ;
1+ using Microsoft . EntityFrameworkCore ;
2+ using Microsoft . Extensions . DependencyInjection ;
3+ using TelegramBot . Builders ;
4+ using TelegramBot . ConsoleTest . Database ;
25
36namespace TelegramBot . ConsoleTest
47{
@@ -9,6 +12,7 @@ static void Main(string[] args)
912 BotBuilder builder = new BotBuilder ( args )
1013 . UseApiKey ( x => x . FromConfiguration ( ) ) ;
1114
15+ builder . Services . AddDbContext < AppDbContext > ( x => x . UseSqlite ( "Data Source=app.db" ) ) ;
1216 var app = builder . Build ( ) ;
1317 app . MapControllers ( ) ;
1418 app . Run ( ) ;
You can’t perform that action at this time.
0 commit comments