ApplicationContext.cs 705 B

12345678910111213141516171819
  1. using ApiMobileBelov.ModelBase;
  2. using Microsoft.EntityFrameworkCore;
  3. namespace ApiMobileBelov.BaseConnection
  4. {
  5. public class ApplicationContext: DbContext
  6. {
  7. public DbSet<Category> tableCategory { get; set; }
  8. public DbSet<Training> tableTraining { get; set; }
  9. public DbSet<CategoryAndTraining> tableCategoryAndTraining { get; set; }
  10. public DbSet<Workout> tableWorkout { get; set; }
  11. public DbSet<CategoryAndTraininhAndWorkout> tableCategoryAndTrainingAndWorkout { get; set; }
  12. protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  13. {
  14. optionsBuilder.UseSqlServer(Constans.SqlConnection);
  15. }
  16. }
  17. }