using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BookStore_DataAccess.repository;
using BookStore_DataAccess.model;
using BookStore_DataAccess.context;

namespace Test_BookStore_DataAccess
{
    class Program
    {
        static void Main(string[] args)
        {
            UnitOfWork unitOfWork = new UnitOfWork();
            unitOfWork.PublisherRepository.Insert(new Publisher()
            {
                PublisherName = "publisher1",
            });
            unitOfWork.PublisherRepository.Insert(new Publisher()
            {
                PublisherName = "publisher2",
            });
            unitOfWork.PublisherRepository.Insert(new Publisher()
            {
                PublisherName = "publisher2",
            });
            unitOfWork.AuthorRepository.Insert(new Author()
            {
                AuthorName="author1",
                AuthorMail="author1@mail.tn"
            });
            unitOfWork.AuthorRepository.Insert(new Author()
            {
                AuthorName = "author2",
                AuthorMail = "author2@mail.tn"
            });
            unitOfWork.AuthorRepository.Insert(new Author()
            {
                AuthorName = "author2",
                AuthorMail = "author2@mail.tn"
            });
            unitOfWork.Save();
        }
    }
}
