Esempio n. 1
0
 public UserRepository(MediasContext context)
 {
     _context = context;
 }
 public MediasRepository(MediasContext context)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }
 public MediasRepository(MediasContext context, IHttpClientFactory httpClientFactory, ILogger <MediasRepository> logger)
 {
     _context           = context ?? throw new ArgumentNullException(nameof(context));
     _httpClientFactory = httpClientFactory ?? throw new ArgumentNullException(nameof(httpClientFactory));
     _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public WatchlistRepository(MediasContext context)
 {
     _context = context;
 }
Esempio n. 5
0
        Medias InterfaceMedia.GetMediaById(int id)
        {
            MediasContext medias = new MediasContext();

            return(medias.GetById(id));
        }
Esempio n. 6
0
        List <Medias> InterfaceMedia.GetAllVideos()
        {
            MediasContext medias = new MediasContext();

            return(medias.GetAllVideos());
        }
Esempio n. 7
0
        List <Medias> InterfaceMedia.FilterMedia(DateTime creationDateStart, DateTime creationDateEnd, string eventName, string eventLocation, int isVideo, Person person, string scenary, string season)
        {
            MediasContext medias = new MediasContext();

            return(medias.Filter(creationDateStart, creationDateEnd, eventName, eventLocation, isVideo, person, scenary, season));
        }
Esempio n. 8
0
        bool InterfaceMedia.DeleteMedia(int id)
        {
            MediasContext medias = new MediasContext();

            return(medias.Delete(id));
        }
Esempio n. 9
0
        bool InterfaceMedia.AddMedia(string path, DateTime creationDate, Event ev, bool isVideo, string note, int rating, List <Person> people, Scenary scenary)
        {
            MediasContext medias = new MediasContext();

            return(medias.Add(path, creationDate, ev, isVideo, note, rating, people, scenary));
        }