Ejemplo n.º 1
0
 public List<CapeReview> FindCapeReviewByCourseId(int cid)
 {
     var errors = new List<string>();
     var repository = new CapeReviewRepository(this.entities);
     var service = new CapeReviewService(repository);
     return service.GetCapeReview(cid, ref errors);
 }
Ejemplo n.º 2
0
 public float GetInstructorRating(int instructorId)
 {
     var errors = new List<string>();
     var repository = new CapeReviewRepository(this.entities);
     var service = new CapeReviewService(repository);
     return service.GetInstructorRating(instructorId, ref errors);
 }
Ejemplo n.º 3
0
        public string InsertCapeReview(CapeReview cr)
        {
            var errors = new List<string>();
            var repository = new CapeReviewRepository(this.entities);
            var service = new CapeReviewService(repository);
            service.InsertCapeReview(cr, ref errors);

            if (errors.Count == 0)
            {
                return "ok";
            }

            return "Failed cape review insert";
        }
Ejemplo n.º 4
0
        public string DeleteCapeReview(int cape_id)
        {
            var errors = new List<string>();
            var repository = new CapeReviewRepository(this.entities);
            var service = new CapeReviewService(repository);
            service.DeleteCapeReview(cape_id, ref errors);

            if (errors.Count == 0)
            {
                return "successful cape review delete";
            }

            return "Failed cape review delete";
        }