session-companion/SessionCompanion/SessionCompanion.Services/Services/MonsterService.cs

29 lines
882 B
C#
Raw Normal View History

2021-01-15 20:30:41 +01:00
using AutoMapper;
using SessionCompanion.Database.Repositories.Base;
using SessionCompanion.Database.Tables;
using SessionCompanion.Services.Base;
using SessionCompanion.Services.Interfaces;
using SessionCompanion.ViewModels.IntelligenceViewModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace SessionCompanion.Services.Services
{
using System.Threading.Tasks;
using SessionCompanion.ViewModels.MonsterViewModels;
public class MonsterService : ServiceBase<MonsterViewModel, Monster>, IMonsterService
{
public MonsterService(IMapper mapper, IRepository<Monster> repository) : base(mapper, repository)
{ }
public List<MonsterViewModel> GetAllMonstersList()
{
var monsters = this.Repository.Get();
return this.Mapper.Map<List<MonsterViewModel>>(monsters);
}
}
}