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; }
Medias InterfaceMedia.GetMediaById(int id) { MediasContext medias = new MediasContext(); return(medias.GetById(id)); }
List <Medias> InterfaceMedia.GetAllVideos() { MediasContext medias = new MediasContext(); return(medias.GetAllVideos()); }
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)); }
bool InterfaceMedia.DeleteMedia(int id) { MediasContext medias = new MediasContext(); return(medias.Delete(id)); }
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)); }