Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

1019 B
Raw Blame
using Grand.Domain.Courses;
using Grand.Web.AdminShared.Models.Catalog;
using Grand.Web.AdminShared.Models.Courses;

namespace Grand.Web.AdminShared.Interfaces;

public interface ICourseViewModelService
{
    Task<CourseModel> PrepareCourseModel(CourseModel model = null);
    Task<Course> InsertCourseModel(CourseModel model);
    Task<Course> UpdateCourseModel(Course course, CourseModel model);
    Task DeleteCourse(Course course);
    Task<CourseLessonModel> PrepareCourseLessonModel(string courseId, CourseLessonModel model = null);
    Task<CourseLesson> InsertCourseLessonModel(CourseLessonModel model);
    Task<CourseLesson> UpdateCourseLessonModel(CourseLesson lesson, CourseLessonModel model);
    Task DeleteCourseLesson(CourseLesson lesson);

    Task<CourseModel.AssociateProductToCourseModel> PrepareAssociateProductToCourseModel();

    Task<(IList<ProductModel> products, int totalCount)> PrepareProductModel(
        CourseModel.AssociateProductToCourseModel model, int pageIndex, int pageSize);
}