public void DeleteRecension(int toDelete)//Recension
 {
     //if (toDelete.RecID == 0)
     //{
     //    RecDAL.DeleteReview(toDelete.RecID);
     //}
     //else
     //{
     //    RecDAL.DeleteReview(toDelete.RecID);
     //}
     RecDAL.DeleteReview(toDelete); //RecID
 }
        public void AddRecension(Recension toAdd)
        {
            var validationContext = new ValidationContext(toAdd);
            var validationResults = new List <ValidationResult>();

            if (!Validator.TryValidateObject(toAdd, validationContext, validationResults))
            {
                var ex = new ValidationException("Objektet klarade inte valideringen.");
                ex.Data.Add("ValidationResults", validationResults);
                throw ex;
            }

            //if (toAdd.RecID == 0)
            //{
            //    RecDAL.AddReview(toAdd);
            //}
            //else
            //{
            //    RecDAL.AddReview(toAdd);
            //}
            RecDAL.AddReview(toAdd);
        }
 public IEnumerable <Recension> GetFilmRecensioner()
 {
     return(RecDAL.GetReview());
 }