예제 #1
0
 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();
 }
예제 #3
0
 public NapsterController()
 {
     artistRepo = new ArtistRepo();
     albumRepo  = new AlbumRepo();
     genreRepo  = new GenreRepo();
     trackRepo  = new TrackRepo();
 }
예제 #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);
 }
예제 #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();
        }
예제 #6
0
        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();
        }
예제 #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();
        }
예제 #8
0
        public ViewResult Index()
        {
            var repo = new GenreRepo();

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