Exemplo n.º 1
0
        public List <Video> VideoFromCommunity(string community_name)
        {
            MediaPlatformDbContext db = MediaPlatformRepository.GetDbContext();
            Community com             = db.Set <Community>().Include(c => c.Videos).SingleOrDefault(c => c.Name == community_name);

            return(com.Videos);
        }
Exemplo n.º 2
0
        public List <Video> VideoFromUser(string username)
        {
            MediaPlatformDbContext db = MediaPlatformRepository.GetDbContext();
            User user = db.Set <User>().Include(u => u.Videos).SingleOrDefault(u => u.Username == username);

            return(user.Videos);
        }
 public IEnumerable <T> Get <T>() where T : class
 {
     return(_db.Set <T>());
 }