Exemplo n.º 1
0
        public EFMainDals([NotNull] IDatabaseConfiguration configuration)
        {
            var connectionString = new NpgsqlConnectionStringBuilder
            {
                Host = configuration.Hostname,
                Port = configuration.Port,
                Username = configuration.Username,
                Password = configuration.Password,
                Database = configuration.Database
            }.ConnectionString;

            context = new EFContext(connectionString);

            Universes = new EFUniverseDal(context);
            Users = new EFUserDal(context);
            Characters = new EFCharacterDal(context);
            Stories = new EFStoryDal(context);
            Favorites = new EFFavoriteDal(context);
            Authors = new EFAuthorDal(context);
            Jobs = new EFJobDal(context);
        }
Exemplo n.º 2
0
 protected EFDalBase([NotNull] EFContext context)
 {
     Context = context;
 }