Skip to content

Commit

Permalink
Merge pull request #54 from kzi-nastava/feat/Course
Browse files Browse the repository at this point in the history
[Add] CourseController Class to Controller
  • Loading branch information
DusicaPesic authored Mar 30, 2024
2 parents a7476ce + 35d521b commit 121ef95
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions LangLang/Core/Controller/CourseController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using LangLang.Core.Model;
using LangLang.Core.Model.DAO;
using LangLang.Core.Observer;
using System.Collections.Generic;

namespace LangLang.Core.Controller
{
public class CourseController
{
private readonly CoursesDAO _courses;

public CourseController()
{
_courses = new CoursesDAO();
}

public List<Course> GetAllVehicles()
{
return _courses.GetAllCourses();
}

public void Add(Course course)
{
_courses.AddCourse(course);
}

public void Delete(int courseId)
{
_courses.RemoveCourse(courseId);
}

public void Subscribe(IObserver observer)
{
_courses.Subscribe(observer);
}

}
}

0 comments on commit 121ef95

Please sign in to comment.