FItneesContext.cs 593 B

123456789101112131415161718192021
  1. using Microsoft.EntityFrameworkCore;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace WpfApp1
  6. {
  7. public class FItneesContext:DbContext
  8. {
  9. public FItneesContext()
  10. {
  11. Database.EnsureCreated();
  12. }
  13. public DbSet<Users> Users { get; set; }
  14. public DbSet<Role> Role { get; set; }
  15. protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  16. {
  17. optionsBuilder.UseSqlServer("Data Source=mssql;Initial Catalog=gr601_schugal ;Integrated Security=True");
  18. }
  19. }
  20. }