using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using DataClasses;

namespace DataRepositories
{
    public class DataContext : DbContext, IDbContext
    {
        public DbSet<UserProfile> Users { get; set; }
        public DbSet<Lesson> Lessons { get; set; }
        public DbSet<Room> Rooms { get; set; }
        public DbSet<SchoolDayRoom> SchoolDays { get; set; }

        public DataContext()
            : base(Setttings.DatabaseConnectionString)
        {
        }

        public new IDbSet<TEntity> Set<TEntity>() where TEntity : class
        {
            return base.Set<TEntity>();
        }
    }
}
