using Demo.Data.RemoteData.RemoteDataBase;
using Demo.Domain.Models;

namespace Demo.Data.Repository
{
    public class SQLAdminRepositoryImpl : IAdminRepository{
        private readonly RemoteDatabaseContext _remoteDatabaseContext;
        public SQLAdminRepositoryImpl(RemoteDatabaseContext remoteDatabaseContext){
            _remoteDatabaseContext = remoteDatabaseContext;
        }

        public List<GroupLocalEntity> GetAllGroup()
        {
            return _remoteDatabaseContext.Groups.Select(x => new GroupLocalEntity{Name = x.Name, ID = x.ID}).ToList();
        }
    }
}