Raspisanie/Zurnal/Date/Repository/IGroupRepository.cs
2024-11-01 10:49:39 +03:00

31 lines
976 B
C#

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