Example #1
0
        public void CreateBLL(string _coment, int _rating, int _idFilm)
        {
            Coments    comments = new Coments();
            ComentsBLL combll   = new ComentsBLL();

            comments.Coment  = _coment;
            comments.Rating  = _rating;
            comments.ID_Film = _idFilm;

            combll.Create(comments);
        }
Example #2
0
        public static int AverageRating()
        {
            _count = 0;

            ComentsBLL commen = new ComentsBLL();

            foreach (var ra in commen.ReadAll())
            {
                _count += ra.Rating;
            }
            _count = _count / commen.ReadAll().Count;

            return(_count);
        }