Demo/Data/Repository/AdminRepositoryImpl.cs

17 lines
587 B
C#
Raw Normal View History

2024-10-30 06:35:19 +00:00
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();
}
}
}