Raspisanie/Zurnal/Date/Repository/IGroupRepository.cs
2024-11-01 09:57:09 +03:00

29 lines
896 B
C#

using Zurnal.domain.Models;
using Microsoft.Extensions.DependencyInjection;
using Zurnal.Data.Repository;
using Group = System.Text.RegularExpressions.Group;
namespace Zurnal.Date.Repository
{
internal interface IGroupRepository
{
List<GroupLocalEntity> GetAllGroup();
bool RemoveGroupById(int groupID);
bool UpdateGroupById(int groupID, GroupLocalEntity updatedGroup);
bool AddGroup(GroupLocalEntity newGroup);
void AddGroupFromRegex(Group group);
Group GetGroupById(int id);
IEnumerable<Group> GetAllGroups();
void UpdateGroup(Group group);
void DeleteGroup(int id);
}
internal class ServiceConfiguration
{
public static void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<RemoteDateBaseContext>()
.AddScoped<IGroupRepository, GroupRepositoryImpl>();
}
}
}