67 lines
1.5 KiB
C#
67 lines
1.5 KiB
C#
using ConstructorApp.BusinessLayer.Abstract;
|
|
using ConstructorApp.DataAccessLayer.Abstract;
|
|
using ConstructorApp.EntityLayer.Entities;
|
|
|
|
namespace ConstructorApp.BusinessLayer.Concrete
|
|
{
|
|
public class ProjectManager : IProjectService
|
|
{
|
|
private readonly IProjectDal _projectDal;
|
|
|
|
public ProjectManager(IProjectDal projectDal)
|
|
{
|
|
_projectDal = projectDal;
|
|
}
|
|
|
|
public void TAdd(Project entity)
|
|
{
|
|
_projectDal.Add(entity);
|
|
}
|
|
|
|
public int TCountAll()
|
|
{
|
|
return _projectDal.CountAll();
|
|
}
|
|
|
|
public void TDelete(Project entity)
|
|
{
|
|
_projectDal.Delete(entity);
|
|
}
|
|
|
|
public Project TGetByID(int id)
|
|
{
|
|
return _projectDal.GetByID(id);
|
|
}
|
|
|
|
public Project TGetBySlug(string slug)
|
|
{
|
|
return _projectDal.GetBySlug(slug);
|
|
}
|
|
|
|
public List<Project> TGetListAll()
|
|
{
|
|
return _projectDal.GetListAll();
|
|
}
|
|
|
|
public Project TGetProjectWithImagesBySlug(string slug)
|
|
{
|
|
return _projectDal.GetProjectWithImagesBySlug(slug);
|
|
}
|
|
|
|
public void TProjectStatusActive(int id)
|
|
{
|
|
_projectDal.ProjectStatusActive(id);
|
|
}
|
|
|
|
public void TProjectStatusPassive(int id)
|
|
{
|
|
_projectDal.ProjectStatusPassive(id);
|
|
}
|
|
|
|
public void TUpdate(Project entity)
|
|
{
|
|
_projectDal.Update(entity);
|
|
}
|
|
}
|
|
}
|