Ejemplo n.º 1
0
 public Course Add(Course course)
 {
     if (CheckOwnership(course.Id) != OwnershipType.None)
     {
         if (course.Title == null || course.Author == null)
         {
             return(null);
         }
         Course result = CourseStorage.Add(course);
         return(result);
     }
     else
     {
         throw new AccessViolationException();
     }
 }// add check for authorization