public BookController(BookRepo bookRepo, AuthorRepo authors, GenreRepo genres, IWebHostEnvironment webHostEnvironment)
 {
     _bookrepo           = bookRepo;
     _authorRepo         = authors;
     _genreRepo          = genres;
     _webHostEnvironment = webHostEnvironment;
 }
 public GenreRemove()
 {
     InitializeComponent();
     _genreRepo = new GenreRepo();
     _index     = 0;
     SetData();
 }
Beispiel #3
0
 public NapsterController()
 {
     artistRepo = new ArtistRepo();
     albumRepo  = new AlbumRepo();
     genreRepo  = new GenreRepo();
     trackRepo  = new TrackRepo();
 }
Beispiel #4
0
 public UnitOfWork(ApplicationDbContext db)
 {
     _db           = db;
     Gigs          = new GigRepo(_db);
     Attendances   = new AttendanceRepo(_db);
     Genres        = new GenreRepo(_db);
     Followings    = new FollowingRepo(_db);
     Notifications = new NotificationRepo(_db);
 }
Beispiel #5
0
        public BookAdd()
        {
            InitializeComponent();
            var _personRepo = new PersonRepo();

            _bookRepo       = new BookRepo();
            _typeBookRepo   = new TypeBookRepo(_bookRepo);
            _genreRepo      = new GenreRepo();
            _publisherRepo  = new PublisherRepo();
            _authorRepo     = new AuthorRepo(_personRepo);
            _firstIteration = true;
            StartingPoint();
        }
        public BookEdit()
        {
            InitializeComponent();
            var personRepo = new PersonRepo();
            var bookRepo   = new BookRepo();

            _typeBook       = new TypeBookRepo(bookRepo);
            _authorRepo     = new AuthorRepo(personRepo);
            _publisherRepo  = new PublisherRepo();
            _genreRepo      = new GenreRepo();
            _index          = 0;
            _firstIteration = true;
            SetData();
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            var repo = new GenreRepo();

            //to get a genre by id
            //var genre = repo.GetById(5);
            //genre.GenreType = "Rom/Com";
            //repo.Save(genre);



            var familyHorror = new Genre {
                GenreType = "Family Horror "
            };

            repo.Save(familyHorror);

            Console.WriteLine(familyHorror.GenreType);



            //repo.DeleteById(7);

            //foreach (var genre in repo.All())
            //{
            //    Console.WriteLine(genre.GenreType);
            //}



            //var familyHorror = new Genre { GenreType = "Family Horror " };
            //repo.Save(familyHorror);

            //foreach (var genre in repo.All())
            //{
            //    Console.WriteLine($"{genre.GenreId} - {genre.GenreType}");
            //}

            //Console.ReadLine();
        }
        public ViewResult Index()
        {
            var repo = new GenreRepo();

            return(View(repo.GetAll().Result));
        }
 public GenreController(GenreRepo genre)
 {
     _genreRepo = genre;
 }
Beispiel #10
0
 public Genres()
 {
     repo = new GenreRepo(); artists = new Artists();
 }
Beispiel #11
0
 public GenreAdd()
 {
     InitializeComponent();
     _genreRepo = new GenreRepo();
 }
Beispiel #12
0
 public GenreService()
 {
     genreRepo = new GenreRepo();
 }