You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.1 KiB
26 lines
1.1 KiB
using Entities;
|
|
using Model.OrderCriteria;
|
|
using Shared;
|
|
|
|
namespace API.Service;
|
|
|
|
public class ParagraphDataServiceApi(IParagraphService<ParagraphEntity> paragraphService) : IParagraphService<ParagraphEntity>
|
|
{
|
|
public IEnumerable<ParagraphEntity> GetParagraphs(int page, int number, ParagraphOrderCriteria orderCriteria)
|
|
{
|
|
var paragraphsEntities = paragraphService.GetParagraphs(page, number, orderCriteria);
|
|
return paragraphsEntities.Select(e => e).ToList();
|
|
}
|
|
|
|
public ParagraphEntity GetParagraphById(int id) => paragraphService.GetParagraphById(id);
|
|
|
|
public ParagraphEntity GetParagraphByTitle(string title) => paragraphService.GetParagraphByTitle(title);
|
|
|
|
public bool DeleteParagraph(int id) => paragraphService.DeleteParagraph(id);
|
|
|
|
public ParagraphEntity UpdateParagraph(int id, ParagraphEntity paragraph) =>
|
|
paragraphService.UpdateParagraph(id, paragraph);
|
|
|
|
public ParagraphEntity CreateParagraph(string title, string content, string info, string query, string comment, int lessonId) =>
|
|
paragraphService.CreateParagraph(title, content, info, query, comment, lessonId);
|
|
} |