You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
855 B
30 lines
855 B
using API_Services;
|
|
using DbContextLib;
|
|
using Model;
|
|
|
|
namespace DbDataManager;
|
|
|
|
public class DbManager : IDataManager
|
|
{
|
|
protected LibraryContext _context { get; set; }
|
|
|
|
public DbManager()
|
|
{
|
|
_context = new LibraryContext();
|
|
ArticleService = new DbManagerArticle(_context);
|
|
UserService = new DbManagerUser(_context);
|
|
FormulaireService = new DbManagerFormulaire(_context);
|
|
}
|
|
|
|
public DbManager(LibraryContext context)
|
|
{
|
|
_context = context;
|
|
ArticleService = new DbManagerArticle(_context);
|
|
UserService = new DbManagerUser(_context);
|
|
FormulaireService = new DbManagerFormulaire(_context);
|
|
}
|
|
|
|
public IArticleService ArticleService { get; set; }
|
|
public IUserService UserService { get; set; }
|
|
public IFormulaireService FormulaireService { get; set; }
|
|
} |