Working full stack forums get
This commit is contained in:
77
BL/Services/FoorumService.cs
Normal file
77
BL/Services/FoorumService.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BL.DTOs;
|
||||
using BL.Interfaces;
|
||||
using DAL.Interfaces;
|
||||
|
||||
namespace BL.Services
|
||||
{
|
||||
public class FoorumService : IFoorumService
|
||||
{
|
||||
private IFoorumRepository _foorumRepository;
|
||||
public FoorumService(IFoorumRepository foorumRepository)
|
||||
{
|
||||
_foorumRepository = foorumRepository;
|
||||
}
|
||||
public void Add(FoorumDTO foorum)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void AddPost(int id, PostDTO post)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Delete(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public FoorumDTO Get(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<FoorumDTO> GetAll()
|
||||
{
|
||||
foreach (var f in _foorumRepository.GetAll())
|
||||
{
|
||||
yield return new FoorumDTO()
|
||||
{
|
||||
FoorumId = f.FoorumId,
|
||||
Title = f.Title
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void Hide(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<FoorumDTO> SearchFoorumAuthor(string query)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<FoorumDTO> SearchFoorumTitle(string query)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerable<PostDTO> SearchPostAuthor(string query)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void Update(FoorumDTO foorum)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user