Created
May 9, 2017 20:33
-
-
Save yostane/68f27bb83f22de83f74222964957db2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.EntityFrameworkCore; | |
| namespace efcore_tuto_1 | |
| { | |
| /// <summary> | |
| /// This class handles the sqlite database | |
| /// </summary> | |
| public class VideoGamesDatabaseContext : DbContext | |
| { | |
| /// <summary> | |
| /// This property allows to manipoulate the video games table | |
| /// </summary> | |
| public DbSet<VideoGame> VideoGames {get; set;} | |
| protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { | |
| // Specify the path of the database here | |
| optionsBuilder.UseSqlite("Filename=./video_games.sqlite"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment