using Microsoft.Extensions.Logging;
using MongoDB.Bson.Serialization;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataProviders.Abstractions {

  /// <summary>
  /// 
  /// </summary>
  /// <typeparam name="T"></typeparam>
  public abstract class DataProviderBase<T> {

    private protected readonly ILogger<T> _logger;
    private protected readonly IMongoDatabase _database;

    /// <summary>
    /// 
    /// </summary>
    /// <param name="logger"></param>
    /// <param name="client"></param>
    /// <param name="idGenerator"></param>
    /// <param name="sessionService"></param>
    /// <param name="databaseName"></param>
    public DataProviderBase(
      ILogger<T> logger,
      IMongoClient client,
      string databaseName
    ) {
      _logger = logger;
      _database = client.GetDatabase(databaseName);
    }
  }
}
