src/ZKEACMS.SectionWidget/Service/SectionContentVideoService.cs
(完整代码) 1KB/* http://www.zkea.net/
* Copyright (c) ZKEASOFT. All rights reserved.
* http://www.zkea.net/licenses */
using ZKEACMS.SectionWidget.Models;
using Easy.RepositoryPattern;
using Easy;
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
namespace ZKEACMS.SectionWidget.Service
{
public class SectionContentVideoService : ServiceBase<SectionContentVideo, CMSDbContext>, ISectionContentService
{
public SectionContentVideoService(IApplicationContext applicationContext, CMSDbContext dbContext) : base(applicationContext, dbContext)
{
}
public SectionContentBase.Types ContentType
{
get { return SectionContentBase.Types.Video; }
}
public override IQueryable<SectionContentVideo> Get()
{
return CurrentDbSet.AsNoTracking();
}
public void AddContent(SectionContent content)
{
Add(content as SectionContentVideo);
}
public void DeleteContent(string contentId)
{
Remove(contentId);
}
public SectionContent GetContent(string contentId)
{
return Get(contentId);
}
public void UpdateContent(SectionContent content)
{
Update(content as SectionContentVideo);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。