ApplicationContext.cs 387 B

12345678910111213141516
  1. using Microsoft.EntityFrameworkCore;
  2. using BelovAPI.ModelBase;
  3. namespace BelovAPI.BaseConnection
  4. {
  5. public class ApplicationContext : DbContext
  6. {
  7. public DbSet<User> User { get; set; }
  8. protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  9. {
  10. optionsBuilder.UseSqlServer(Constans.SqlConnection);
  11. }
  12. }
  13. }