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(); }
public NapsterController() { artistRepo = new ArtistRepo(); albumRepo = new AlbumRepo(); genreRepo = new GenreRepo(); trackRepo = new TrackRepo(); }
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); }
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(); }
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; }
public Genres() { repo = new GenreRepo(); artists = new Artists(); }
public GenreAdd() { InitializeComponent(); _genreRepo = new GenreRepo(); }
public GenreService() { genreRepo = new GenreRepo(); }