2024-11-01 07:49:39 +00:00
|
|
|
|
using Zurnal.RemaDateBase.DateDao;
|
2024-10-31 11:37:45 +00:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Zurnal.Data.Repository;
|
2024-11-01 06:57:09 +00:00
|
|
|
|
using Group = System.Text.RegularExpressions.Group;
|
2024-10-21 11:56:16 +00:00
|
|
|
|
|
|
|
|
|
namespace Zurnal.Date.Repository
|
|
|
|
|
{
|
|
|
|
|
internal interface IGroupRepository
|
2024-11-01 07:49:39 +00:00
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
2024-10-31 11:37:45 +00:00
|
|
|
|
|
|
|
|
|
internal class ServiceConfiguration
|
|
|
|
|
{
|
|
|
|
|
public static void ConfigureServices(IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.AddDbContext<RemoteDateBaseContext>()
|
|
|
|
|
.AddScoped<IGroupRepository, GroupRepositoryImpl>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|