Raspisanie/Zurnal/Date/Repository/IGroupRepository.cs
2024-10-31 14:37:45 +03:00

24 lines
742 B
C#

using Zurnal.domain.Models;
using Microsoft.Extensions.DependencyInjection;
using Zurnal.Data.Repository;
namespace Zurnal.Date.Repository
{
internal interface IGroupRepository
{
List<GroupLocalEntity> GetAllGroup();
bool RemoveGroupById(int groupID);
bool UpdateGroupById(int groupID, GroupLocalEntity updatedGroup);
GroupLocalEntity GetGroupById(int groupID);
bool AddGroup(GroupLocalEntity newGroup);
}
internal class ServiceConfiguration
{
public static void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<RemoteDateBaseContext>()
.AddScoped<IGroupRepository, GroupRepositoryImpl>();
}
}
}