Ejemplo n.º 1
0
        //public String Movies_Name { get; set; }
        public List <MoviesView> getMovies()
        {
            List <MoviesView> mResult = null;

            using (var db = new MoviesEntities())
            {
                var result = db.SP_GET_MOVIES().ToList();
                mResult = result.Select(s => new MoviesView
                {
                    Movies_Name = s.EPName,
                    Movies_Time = s.EPTime,
                }).ToList();
            }
            return(mResult);
        }
Ejemplo n.º 2
0
        public List <MoviesView> getMaster()
        {
            List <MoviesView> mResult = null;

            using (var db = new MoviesEntities())
            {
                var result = db.Master.ToList();
                mResult = result.Select(s => new MoviesView
                {
                    Movies_ID    = s.id,
                    Movies_Name  = s.Name,
                    Movies_Image = String.Format("Content/MasterImage/{0}", s.Image),
                    Movies_Time  = s.CreatedOn.HasValue ? s.CreatedOn.Value.ToShortDateString() : "-"
                }).ToList();
            }
            return(mResult);
        }
Ejemplo n.º 3
0
        public List <MoviesView> getSeaSon(String id)
        {
            List <MoviesView> mResult = new List <MoviesView>();

            if (id != null)
            {
                using (var db = new MoviesEntities())
                {
                    var result = db.Season.ToList();
                    mResult = result.Where(w => w.idMaster == int.Parse(id)).Select(s => new MoviesView
                    {
                        Movies_ID    = s.id,
                        Movies_Name  = s.Name,
                        Movies_Image = String.Format("/Content/SeasonImage/{0}", s.Image)
                    }).ToList();
                }
            }
            return(mResult);
        }