25 lines
556 B
C#
25 lines
556 B
C#
|
using Bunny.Common.EFCore;
|
|||
|
using Bunny.Dao.Models.System;
|
|||
|
|
|||
|
namespace Bunny.Service.IService.Service;
|
|||
|
|
|||
|
public class BlogService : IBlogService
|
|||
|
{
|
|||
|
private readonly EfCoreContext _dbContext;
|
|||
|
|
|||
|
public BlogService(EfCoreContext dbContext)
|
|||
|
{
|
|||
|
_dbContext = dbContext;
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 添加Blog
|
|||
|
/// </summary>
|
|||
|
/// <param name="dto"></param>
|
|||
|
/// <exception cref="NotImplementedException"></exception>
|
|||
|
public void AddBlog(Blog dto)
|
|||
|
{
|
|||
|
_dbContext.Add(dto);
|
|||
|
_dbContext.SaveChanges();
|
|||
|
}
|
|||
|
}
|