Last active
May 3, 2019 21:44
-
-
Save SafaElmali/6b86c4574c90614ce739157213b4bdd2 to your computer and use it in GitHub Desktop.
Context file
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.Models { | |
public class EFContext : DbContext { | |
private const string connectionString = "Server=.\\;Database=EFCore;Trusted_Connection=True;"; | |
protected override void OnConfiguring (DbContextOptionsBuilder optionsBuilder) { | |
optionsBuilder.UseSqlServer (connectionString); | |
} | |
public DbSet<Product> Products { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment