Compare commits
No commits in common. "master" and "416f0914dcab20ac96a1e586066446e093e892c5" have entirely different histories.
master
...
416f0914dc
@ -1,10 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.Exceptions
|
||||
{
|
||||
// Исключение для случая, когда данные уже существуют
|
||||
public class DataAlreadyExistsException : Exception
|
||||
{
|
||||
public DataAlreadyExistsException(string message) : base(message) { }
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.Exceptions
|
||||
{
|
||||
// Исключение для случая, когда данные не найдены
|
||||
public class DataNotFoundException : Exception
|
||||
{
|
||||
public DataNotFoundException(string message) : base(message) { }
|
||||
}
|
||||
}
|
10
Demo/Data/Exceptions/GroupNotFoundException.cs
Normal file
10
Demo/Data/Exceptions/GroupNotFoundException.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.Exceptions
|
||||
{
|
||||
public class GroupNotFoundException : RepositoryException
|
||||
{
|
||||
public GroupNotFoundException(int userId)
|
||||
: base($"Группа с ID {userId} не найдена.") { }
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.Exceptions
|
||||
{
|
||||
// Исключение для случая, когда GUID не найден
|
||||
public class GuidNotFoundException : Exception
|
||||
{
|
||||
public GuidNotFoundException(string message) : base(message) { }
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.Exceptions
|
||||
{
|
||||
// Исключение для случаев, когда передан некорректный или несуществующий ID группы
|
||||
public class InvalidGroupIdException : Exception
|
||||
{
|
||||
public InvalidGroupIdException(string message) : base(message) { }
|
||||
}
|
||||
}
|
9
Demo/Data/Exceptions/RepositoryException.cs
Normal file
9
Demo/Data/Exceptions/RepositoryException.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.Exceptions
|
||||
{
|
||||
public class RepositoryException : Exception
|
||||
{
|
||||
public RepositoryException(string message) : base(message) { }
|
||||
}
|
||||
}
|
10
Demo/Data/Exceptions/UserNotFoundException.cs
Normal file
10
Demo/Data/Exceptions/UserNotFoundException.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.Exceptions
|
||||
{
|
||||
public class UserNotFoundException : RepositoryException
|
||||
{
|
||||
public UserNotFoundException(int userId)
|
||||
: base($"Пользователь с ID {userId} не найден.") { }
|
||||
}
|
||||
}
|
@ -1,8 +1,17 @@
|
||||
namespace Demo.Domain.Models
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.domain.Models
|
||||
{
|
||||
public class GroupLocalEntity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public required string Name { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.domain.Models
|
||||
{
|
||||
internal class PresenceLocalEntity
|
||||
public class PresenceLocalEntity
|
||||
{
|
||||
public required Guid UserGuid { get; set; }
|
||||
public required int UserId { get; set; }
|
||||
public required int GroupId { get; set; }
|
||||
public bool IsAttedance { get; set; } = true;
|
||||
public required DateOnly Date { get; set; }
|
||||
public required DateTime Date { get; set; }
|
||||
|
||||
public required int LessonNumber { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -6,20 +6,20 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.domain.Models
|
||||
{
|
||||
public class UserLocalEntity : IEquatable<UserLocalEntity>
|
||||
public class UserLocalEnity : IEquatable<UserLocalEnity>
|
||||
{
|
||||
|
||||
public required string FIO { get; set; }
|
||||
public Guid Guid { get; set; }
|
||||
public int ID { get; set; }
|
||||
|
||||
public required int GroupID { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public bool Equals(UserLocalEntity? other)
|
||||
public bool Equals(UserLocalEnity? other)
|
||||
{
|
||||
if (other == null) return false;
|
||||
return this.Guid.Equals(other.Guid);
|
||||
return this.ID.Equals(other.ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Demo.domain.Models;
|
||||
using Demo.Domain.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -12,21 +11,26 @@ namespace Demo.Data.LocalData
|
||||
public static class LocalStaticData
|
||||
{
|
||||
public static List<GroupLocalEntity> groups => new List<GroupLocalEntity>
|
||||
|
||||
|
||||
{
|
||||
new GroupLocalEntity{ Id = 1, Name = "ИП1-21" },
|
||||
new GroupLocalEntity{ Id = 2, Name = "ИП1-22" },
|
||||
new GroupLocalEntity{ Id = 3, Name = "ИП1-23" },
|
||||
};
|
||||
|
||||
public static List<UserLocalEntity> users => new List<UserLocalEntity>
|
||||
public static List<UserLocalEnity> users => new List<UserLocalEnity>
|
||||
{
|
||||
new UserLocalEntity{Guid=Guid.Parse("e6b9964d-ea9f-420a-84b9-af9633bbfab9"), FIO = "RandomFio", GroupID = 1 },
|
||||
new UserLocalEntity{Guid=Guid.Parse("8388d931-5bef-41be-a152-78f1aca980ed"), FIO = "RandomFio1", GroupID = 2 },
|
||||
new UserLocalEntity{Guid=Guid.Parse("ed174548-49ed-4503-a902-c970cbf27173"), FIO = "RandomFio2", GroupID = 3 },
|
||||
new UserLocalEntity{Guid=Guid.Parse("614c0a23-5bd5-43ae-b48e-d5750afbc282"), FIO = "RandomFio3", GroupID = 1 },
|
||||
new UserLocalEntity{Guid=Guid.Parse("efcc1473-c116-4244-b3f7-f2341a5c3003"), FIO = "RandomFio4", GroupID = 2 },
|
||||
new UserLocalEntity{Guid=Guid.Parse("60640fb3-ace2-4cad-81d5-a0a58bc2dbbd"), FIO = "RandomFio5", GroupID = 3 },
|
||||
new UserLocalEnity{ID = 1, FIO = "RandomFio", GroupID = 1 },
|
||||
new UserLocalEnity{ID = 2, FIO = "RandomFio1", GroupID = 2 },
|
||||
new UserLocalEnity{ID = 3, FIO = "RandomFio2", GroupID = 3 },
|
||||
new UserLocalEnity{ID = 4, FIO = "RandomFio3", GroupID = 1 },
|
||||
new UserLocalEnity{ID = 5, FIO = "RandomFio4", GroupID = 2 },
|
||||
new UserLocalEnity{ID = 6, FIO = "RandomFio5", GroupID = 3 },
|
||||
};
|
||||
|
||||
public static List<PresenceLocalEntity> presences => new List<PresenceLocalEntity>
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
Demo/Data/RemoteData/RemoteDataBase/DAO/Group.cs
Normal file
16
Demo/Data/RemoteData/RemoteDataBase/DAO/Group.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using Demo.domain.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.RemoteData.RemoteDataBase.DAO
|
||||
{
|
||||
public class GroupDao
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public List<UserDao> Users { get; set; }
|
||||
}
|
||||
}
|
18
Demo/Data/RemoteData/RemoteDataBase/DAO/Presence.cs
Normal file
18
Demo/Data/RemoteData/RemoteDataBase/DAO/Presence.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.RemoteData.RemoteDataBase.DAO
|
||||
{
|
||||
public class PresenceDao
|
||||
{
|
||||
public int PresenceId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public bool IsAttedance { get; set; } = true;
|
||||
public DateOnly Date { get; set; }
|
||||
public int LessonNumber { get; set; }
|
||||
public int GroupId { get; set; }
|
||||
}
|
||||
}
|
16
Demo/Data/RemoteData/RemoteDataBase/DAO/User.cs
Normal file
16
Demo/Data/RemoteData/RemoteDataBase/DAO/User.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.RemoteData.RemoteDataBase.DAO
|
||||
{
|
||||
public class UserDao
|
||||
{
|
||||
public required string FIO { get; set; }
|
||||
public required int UserId { get; set; }
|
||||
public required int GroupId { get; set; }
|
||||
public GroupDao? Group { get; set; }
|
||||
}
|
||||
}
|
12
Demo/Data/RemoteData/RemoteDataBase/RemoteDatabase.cs
Normal file
12
Demo/Data/RemoteData/RemoteDataBase/RemoteDatabase.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.RemoteData.RemoteDataBase
|
||||
{
|
||||
internal class RemoteDatabase
|
||||
{
|
||||
}
|
||||
}
|
35
Demo/Data/RemoteData/RemoteDataBase/RemoteDatabaseContext.cs
Normal file
35
Demo/Data/RemoteData/RemoteDataBase/RemoteDatabaseContext.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.RemoteData.RemoteDataBase
|
||||
{
|
||||
public class RemoteDatabaseContext: DbContext
|
||||
{
|
||||
public DbSet<GroupDao> Groups { get; set; }
|
||||
public DbSet<UserDao> Users { get; set; }
|
||||
public DbSet<PresenceDao> PresenceDaos { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=presencedb;Username=postgres;Password=123;Include Error Detail=True;");
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<GroupDao>().HasKey(group=>group.Id);
|
||||
modelBuilder.Entity<GroupDao>().Property(group => group.Id).ValueGeneratedOnAdd();
|
||||
modelBuilder.Entity<UserDao>().HasKey(user=>user.UserId);
|
||||
modelBuilder.Entity<UserDao>().Property(user=>user.UserId).ValueGeneratedOnAdd();
|
||||
modelBuilder.Entity<PresenceDao>().HasKey(presence =>presence.PresenceId);
|
||||
modelBuilder.Entity<PresenceDao>().Property(presence=>presence.PresenceId).ValueGeneratedOnAdd();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,103 +1,75 @@
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Domain.Models;
|
||||
using Demo.Data.Exceptions;
|
||||
using System;
|
||||
using Demo.Data.Exceptions;
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.Data.Repository;
|
||||
using Demo.domain.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Demo.Domain.UseCase;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
public class GroupRepositoryImpl: IGroupRepository
|
||||
{
|
||||
public class GroupRepositoryImpl: IGroupRepository
|
||||
private List<GroupLocalEntity> _groups = LocalStaticData.groups;
|
||||
|
||||
|
||||
public GroupLocalEntity? GetGroupById(int groupId)
|
||||
{
|
||||
private List<GroupLocalEntity> _groups;
|
||||
|
||||
public GroupRepositoryImpl()
|
||||
foreach (var group in _groups)
|
||||
{
|
||||
_groups = LocalStaticData.groups;
|
||||
if (group.Id == groupId)
|
||||
{
|
||||
return group;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<GroupLocalEntity> GetAllGroups()
|
||||
|
||||
|
||||
|
||||
// Метод для получения всех групп
|
||||
public List<GroupLocalEntity> GetAllGroups() => _groups;
|
||||
|
||||
// Метод для добавления новой группы
|
||||
public void AddGroup(GroupLocalEntity group)
|
||||
{
|
||||
group.Id = _groups.Any() ? _groups.Max(g => g.Id) + 1 : 1;
|
||||
_groups.Add(group);
|
||||
}
|
||||
|
||||
// Метод для обновления существующей группы
|
||||
public void UpdateGroupById(int groupId, GroupLocalEntity updatedGroup)
|
||||
{
|
||||
var existingGroup = GetGroupById(groupId);
|
||||
if (existingGroup == null) throw new GroupNotFoundException(groupId);
|
||||
}
|
||||
|
||||
public void RemoveGroupById(int groupId)
|
||||
{
|
||||
var existingGroup = GetGroupById(groupId);
|
||||
if (existingGroup == null) throw new GroupNotFoundException(groupId);
|
||||
if (_groups.Contains(existingGroup))
|
||||
{
|
||||
return _groups;
|
||||
}
|
||||
|
||||
public bool AddGroup(GroupLocalEntity group)
|
||||
{
|
||||
_groups.Add(new GroupLocalEntity { Id = group.Id, Name = group.Name });
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool UpdateGroup(int id)
|
||||
{
|
||||
try
|
||||
{
|
||||
var group = _groups.FirstOrDefault(g => g.Id == id);
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
throw new InvalidGroupIdException($"Группа с ID {id} не существует.");
|
||||
}
|
||||
string newName = Console.ReadLine();
|
||||
try
|
||||
{
|
||||
if (newName != "")
|
||||
{
|
||||
group.Name = newName;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Console.WriteLine("Введите корректное название группы");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (InvalidGroupIdException ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка: {ex.Message}");
|
||||
}
|
||||
catch (DataNotFoundException ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка: {ex.Message}");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool DeleteGroupById(int id)
|
||||
{
|
||||
try
|
||||
{
|
||||
var group = _groups.FirstOrDefault(g => g.Id == id);
|
||||
if (group != null)
|
||||
{
|
||||
_groups.Remove(group);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new DataNotFoundException($"Группа с ID {id} не найдена.");
|
||||
}
|
||||
}
|
||||
catch (DataNotFoundException ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка: {ex.Message}");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public GroupLocalEntity GetGroupById(int groupID)
|
||||
{
|
||||
var _groups = GetAllGroups();
|
||||
foreach (var _group in _groups)
|
||||
{
|
||||
if (_group.Id == groupID)
|
||||
{
|
||||
Console.WriteLine();
|
||||
Console.WriteLine($"ID группы: {_group.Id} Название группы: {_group.Name}");
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
_groups.Remove(existingGroup);
|
||||
}
|
||||
}
|
||||
|
||||
List<GroupDao> IGroupRepository.GetAllGroups()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool UpdateGroupById(int groupID, GroupDao updatedGroup)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
GroupDao IGroupRepository.GetGroupById(int groupID)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool AddGroup(string Name)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Demo.Domain.Models;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -9,10 +10,9 @@ namespace Demo.Data.Repository
|
||||
{
|
||||
public interface IGroupRepository
|
||||
{
|
||||
List<GroupLocalEntity> GetAllGroups();
|
||||
bool DeleteGroupById(int groupID);
|
||||
bool UpdateGroup(int groupID);
|
||||
GroupLocalEntity GetGroupById(int groupID);
|
||||
bool AddGroup(GroupLocalEntity newGroup);
|
||||
List<GroupDao> GetAllGroups();
|
||||
bool UpdateGroupById(int groupID, GroupDao updatedGroup);
|
||||
GroupDao GetGroupById(int groupID);
|
||||
bool AddGroup(string Name);
|
||||
}
|
||||
}
|
||||
}
|
21
Demo/Data/Repository/IPresenceRepository.cs
Normal file
21
Demo/Data/Repository/IPresenceRepository.cs
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using Demo.Domain.UseCase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
{
|
||||
public interface IPresenceRepository
|
||||
{
|
||||
List<PresenceDao> GetPresenceByDateAndGroup(DateTime date, int groupId);
|
||||
void SavePresence(List<PresenceDao> presences);
|
||||
List<PresenceDao> GetPresenceByGroup(int groupId);
|
||||
DateOnly? GetLastDateByGroupId(int groupId);
|
||||
List<PresenceDao> GetPresenceForAbsent(DateTime date, int GroupId);
|
||||
}
|
||||
}
|
13
Demo/Data/Repository/IUserRepository.cs
Normal file
13
Demo/Data/Repository/IUserRepository.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
{
|
||||
public interface IUserRepository
|
||||
{
|
||||
List<UserDao> GetAllUsers();
|
||||
bool RemoveUserById(int userId);
|
||||
UserDao? UpdateUser(UserDao user);
|
||||
}
|
||||
}
|
53
Demo/Data/Repository/PresenceRepositoryImpl.cs
Normal file
53
Demo/Data/Repository/PresenceRepositoryImpl.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.RemoteData.RemoteDataBase;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
{
|
||||
public class PresenceRepositoryImpl
|
||||
{
|
||||
private List<PresenceLocalEntity> _presences;
|
||||
|
||||
public PresenceRepositoryImpl()
|
||||
{
|
||||
_presences = new List<PresenceLocalEntity>(); // Ваши реальные данные
|
||||
}
|
||||
|
||||
public void SavePresence(List<PresenceLocalEntity> presences)
|
||||
{
|
||||
foreach (var presence in presences)
|
||||
{
|
||||
var existingPresence = _presences.FirstOrDefault(p =>
|
||||
p.Date == presence.Date &&
|
||||
p.UserId == presence.UserId &&
|
||||
p.LessonNumber == presence.LessonNumber);
|
||||
|
||||
if (existingPresence == null)
|
||||
{
|
||||
_presences.Add(presence);
|
||||
}
|
||||
else
|
||||
{
|
||||
existingPresence.IsAttedance = presence.IsAttedance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<PresenceLocalEntity> GetPresenceByDateAndGroup(DateTime date, int groupId)
|
||||
{
|
||||
return _presences.Where(p => p.Date.Date == date.Date &&
|
||||
LocalStaticData.users.Any(u => u.GroupID == groupId && u.ID == p.UserId)).ToList();
|
||||
}
|
||||
|
||||
public List<PresenceLocalEntity> GetPresenceByGroup(int groupId)
|
||||
{
|
||||
return _presences.Where(p => p.GroupId == groupId).ToList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
122
Demo/Data/Repository/SQLGroupRepositoryImpl.cs
Normal file
122
Demo/Data/Repository/SQLGroupRepositoryImpl.cs
Normal file
@ -0,0 +1,122 @@
|
||||
using Demo.Data.RemoteData.RemoteDataBase;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
{
|
||||
public class SQLGroupRepositoryImpl : IGroupRepository
|
||||
{
|
||||
private readonly RemoteDatabaseContext _remoteDatabaseContext;
|
||||
|
||||
public SQLGroupRepositoryImpl(RemoteDatabaseContext remoteDatabaseContext)
|
||||
{
|
||||
_remoteDatabaseContext = remoteDatabaseContext;
|
||||
}
|
||||
|
||||
// Метод для добавления новой группы
|
||||
public bool AddGroup(GroupDao newGroup)
|
||||
{
|
||||
var groupDao = new GroupDao
|
||||
{
|
||||
Name = newGroup.Name
|
||||
};
|
||||
_remoteDatabaseContext.Groups.Add(groupDao);
|
||||
_remoteDatabaseContext.SaveChanges();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Метод для получения группы по ID
|
||||
public GroupDao GetGroupById(int groupId)
|
||||
{
|
||||
var groupDao = _remoteDatabaseContext.Groups
|
||||
.Include(g => g.Users)
|
||||
.FirstOrDefault(g => g.Id == groupId);
|
||||
if (groupDao == null) return null;
|
||||
|
||||
return new GroupDao
|
||||
{
|
||||
Id = groupDao.Id,
|
||||
Name = groupDao.Name,
|
||||
Users = groupDao.Users.Select(u => new UserDao
|
||||
{
|
||||
UserId = u.UserId,
|
||||
FIO = u.FIO,
|
||||
GroupId = u.GroupId
|
||||
}).ToList()
|
||||
};
|
||||
}
|
||||
|
||||
// Метод для получения всех групп
|
||||
public List<GroupDao> GetAllGroups()
|
||||
{
|
||||
return _remoteDatabaseContext.Groups
|
||||
.Include(g => g.Users)
|
||||
.Select(g => new GroupDao
|
||||
{
|
||||
Id = g.Id,
|
||||
Name = g.Name,
|
||||
Users = g.Users.Select(u => new UserDao
|
||||
{
|
||||
UserId = u.UserId,
|
||||
FIO = u.FIO,
|
||||
GroupId = u.GroupId
|
||||
}).ToList()
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
// Метод для обновления группы по ID
|
||||
public bool UpdateGroupById(int groupId, GroupDao updatedGroup)
|
||||
{
|
||||
var groupDao = _remoteDatabaseContext.Groups
|
||||
.Include(g => g.Users)
|
||||
.FirstOrDefault(g => g.Id == groupId);
|
||||
if (groupDao == null) return false;
|
||||
|
||||
groupDao.Name = updatedGroup.Name;
|
||||
// Пример обновления списка пользователей
|
||||
groupDao.Users = updatedGroup.Users.Select(user => new UserDao
|
||||
{
|
||||
UserId = user.UserId,
|
||||
FIO = user.FIO,
|
||||
GroupId = user.GroupId
|
||||
}).ToList();
|
||||
|
||||
_remoteDatabaseContext.SaveChanges();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Метод для удаления группы по ID
|
||||
public bool RemoveGroupById(int groupId)
|
||||
{
|
||||
var groupDao = _remoteDatabaseContext.Groups.Find(groupId);
|
||||
if (groupDao == null) return false;
|
||||
|
||||
_remoteDatabaseContext.Groups.Remove(groupDao);
|
||||
_remoteDatabaseContext.SaveChanges();
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool UpdateGroupById(int groupID, GroupLocalEntity updatedGroup)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
public bool AddGroup(string Name)
|
||||
{
|
||||
|
||||
var groupDao = new GroupDao
|
||||
{
|
||||
Name = Name
|
||||
};
|
||||
_remoteDatabaseContext.Groups.Add(groupDao);
|
||||
_remoteDatabaseContext.SaveChanges();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
66
Demo/Data/Repository/SQLPresenceRepository.cs
Normal file
66
Demo/Data/Repository/SQLPresenceRepository.cs
Normal file
@ -0,0 +1,66 @@
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.RemoteData.RemoteDataBase;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
{
|
||||
public class SQLPresenceRepositoryImpl : IPresenceRepository
|
||||
{
|
||||
private readonly RemoteDatabaseContext _remoteDatabaseContext;
|
||||
|
||||
public SQLPresenceRepositoryImpl(RemoteDatabaseContext remoteDatabaseContext)
|
||||
{
|
||||
_remoteDatabaseContext = remoteDatabaseContext;
|
||||
}
|
||||
public List<PresenceDao> GetPresenceForAbsent(DateTime date, int GroupId)
|
||||
{
|
||||
return _remoteDatabaseContext.PresenceDaos.Where(p => p.GroupId == GroupId && p.Date==DateOnly.FromDateTime(date)).ToList();
|
||||
}
|
||||
public List<PresenceDao> GetPresenceByDateAndGroup(DateTime date, int groupId)
|
||||
{
|
||||
return _remoteDatabaseContext.PresenceDaos.Where(p => p.Date == DateOnly.FromDateTime(date) &&
|
||||
_remoteDatabaseContext.Users.Any(u => u.GroupId == groupId && u.UserId == p.UserId)).ToList();
|
||||
}
|
||||
|
||||
// Реализация метода для получения всех данных по группе
|
||||
public List<PresenceDao> GetPresenceByGroup(int groupId)
|
||||
{
|
||||
return _remoteDatabaseContext.PresenceDaos.Where(p => p.GroupId == groupId).ToList();
|
||||
}
|
||||
|
||||
public void SavePresence(List<PresenceDao> presences)
|
||||
{
|
||||
_remoteDatabaseContext.PresenceDaos.AddRange(presences.Select(it => new PresenceDao
|
||||
{
|
||||
Date = it.Date,
|
||||
IsAttedance = it.IsAttedance,
|
||||
LessonNumber = it.LessonNumber,
|
||||
UserId = it.UserId,
|
||||
GroupId = it.GroupId
|
||||
}));
|
||||
_remoteDatabaseContext.SaveChanges();
|
||||
}
|
||||
|
||||
public DateOnly? GetLastDateByGroupId(int groupId)
|
||||
{
|
||||
// Проверяем наличие записей о посещаемости в базе данных для данной группы.
|
||||
var lastDate = _remoteDatabaseContext.PresenceDaos
|
||||
.Where(p => p.GroupId == groupId)
|
||||
.OrderByDescending(p => p.Date)
|
||||
.Select(p => p.Date)
|
||||
.FirstOrDefault();
|
||||
|
||||
return lastDate == default ? (DateOnly?)null : lastDate;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
49
Demo/Data/Repository/SQLUserRepositoryImpl.cs
Normal file
49
Demo/Data/Repository/SQLUserRepositoryImpl.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using Demo.Data.Exceptions;
|
||||
using Demo.Data.RemoteData.RemoteDataBase;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
{
|
||||
public class SQLUserRepositoryImpl : IUserRepository
|
||||
{
|
||||
private readonly RemoteDatabaseContext _remoteDatabaseContext;
|
||||
|
||||
public SQLUserRepositoryImpl(RemoteDatabaseContext remoteDatabaseContext)
|
||||
{
|
||||
_remoteDatabaseContext = remoteDatabaseContext;
|
||||
}
|
||||
|
||||
public bool RemoveUserById(int userId)
|
||||
{
|
||||
var user = _remoteDatabaseContext.Users.FirstOrDefault(u => u.UserId == userId);
|
||||
if (user == null) throw new UserNotFoundException(userId);
|
||||
|
||||
_remoteDatabaseContext.Users.Remove(user);
|
||||
return true;
|
||||
}
|
||||
|
||||
public UserDao? UpdateUser(UserDao user)
|
||||
{
|
||||
var existingUser = _remoteDatabaseContext.Users.FirstOrDefault(u => u.UserId == user.UserId);
|
||||
if (existingUser == null) throw new UserNotFoundException(user.UserId);
|
||||
|
||||
// Обновляем поля существующего пользователя
|
||||
existingUser.FIO = user.FIO;
|
||||
existingUser.GroupId = user.GroupId;
|
||||
_remoteDatabaseContext.SaveChanges();
|
||||
|
||||
return existingUser;
|
||||
}
|
||||
|
||||
public List<UserDao> GetAllUsers()
|
||||
{
|
||||
// Возвращаем пользователей, отсортированных по UserId
|
||||
return _remoteDatabaseContext.Users.OrderBy(u => u.UserId).ToList();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.Exceptions;
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using Demo.Data.Exceptions; // Добавлено
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -9,60 +10,28 @@ namespace Demo.Data.Repository
|
||||
{
|
||||
public class UserRepositoryImpl
|
||||
{
|
||||
private List<UserLocalEntity> _users;
|
||||
private List<UserLocalEnity> _users;
|
||||
|
||||
public UserRepositoryImpl()
|
||||
{
|
||||
_users = LocalStaticData.users; // Получаем пользователей из LocalStaticData
|
||||
_users = LocalStaticData.users;
|
||||
}
|
||||
|
||||
// Получение всех пользователей
|
||||
public IEnumerable<UserLocalEntity> GetAllUsers => _users;
|
||||
public IEnumerable<UserLocalEnity> GetAllUsers => _users;
|
||||
|
||||
// Удаление пользователя по GUID
|
||||
public void DeleteUserByGuid(Guid guid)
|
||||
|
||||
public bool RemoveUserById(int userId)
|
||||
{
|
||||
var user = _users.FirstOrDefault(u => u.Guid == guid);
|
||||
if (user != null)
|
||||
{
|
||||
_users.Remove(user);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new GuidNotFoundException($"Пользователь с GUID {guid} не найден."); // Кастомное исключение
|
||||
}
|
||||
var user = _users.FirstOrDefault(u => u.ID == userId);
|
||||
if (user == null) throw new UserNotFoundException(userId);
|
||||
|
||||
_users.Remove(user);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Поиск пользователя по GUID
|
||||
public UserLocalEntity? FindUserByGuid(Guid guid)
|
||||
public UserDao? UpdateUser(UserDao user)
|
||||
{
|
||||
var user = _users.FirstOrDefault(u => u.Guid == guid);
|
||||
if (user == null)
|
||||
{
|
||||
throw new GuidNotFoundException($"Пользователь с GUID {guid} не найден."); // Кастомное исключение
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
// Обновление пользователя
|
||||
public void UpdateUser(string guidOrInt, string newFIO, int newGroupID)
|
||||
{
|
||||
Guid guid;
|
||||
if (!Guid.TryParse(guidOrInt, out guid))
|
||||
{
|
||||
throw new ArgumentException($"Значение '{guidOrInt}' не является корректным GUID.");
|
||||
}
|
||||
|
||||
var user = _users.FirstOrDefault(u => u.Guid == guid);
|
||||
if (user != null)
|
||||
{
|
||||
user.FIO = newFIO;
|
||||
user.GroupID = newGroupID;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new GuidNotFoundException($"Пользователь с GUID {guid} не найден."); // Кастомное исключение
|
||||
}
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,18 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Data\RemoteData\" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Data\RemoteData\RemoteApi\" />
|
||||
<Folder Include="Migrations\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -8,7 +8,7 @@ namespace Demo.domain.Models
|
||||
{
|
||||
public class Group
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public required int Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,18 @@
|
||||
namespace Demo.domain.Models
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.domain.Models
|
||||
{
|
||||
public class Presence
|
||||
{
|
||||
public required Guid UserGuid { get; set; }
|
||||
|
||||
public required User User { get; set; }
|
||||
public required int GroupId { get; set; }
|
||||
public bool IsAttedance { get; set; } = true;
|
||||
public required DateOnly Date { get; set; }
|
||||
public required DateTime Date { get; set; }
|
||||
public required int LessonNumber { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.domain.Models
|
||||
@ -10,9 +9,7 @@ namespace Demo.domain.Models
|
||||
public class User
|
||||
{
|
||||
public required string FIO { get; set; }
|
||||
public Guid Guid { get; set; }
|
||||
public int GroupID { get; set; }
|
||||
public int ID { get; set; }
|
||||
public required Group Group { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,39 +1,105 @@
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.Data.Repository;
|
||||
using Demo.Domain.Models;
|
||||
using Demo.domain.Models;
|
||||
|
||||
namespace Demo.Domain.UseCase
|
||||
{
|
||||
public class GroupUseCase
|
||||
{
|
||||
private readonly IGroupRepository _repositoryGroupImpl;
|
||||
|
||||
private readonly GroupRepositoryImpl _repositoryGroupImpl;
|
||||
private List<GroupLocalEntity> _groups = LocalStaticData.groups;
|
||||
|
||||
public GroupUseCase(GroupRepositoryImpl repositoryGroupImpl)
|
||||
public GroupUseCase(IGroupRepository repositoryGroupImpl)
|
||||
{
|
||||
_repositoryGroupImpl = repositoryGroupImpl;
|
||||
}
|
||||
|
||||
public List<GroupLocalEntity> GetAllGroups()
|
||||
// Приватный метод для валидации имени группы
|
||||
private void ValidateGroupName(string groupName)
|
||||
{
|
||||
return _repositoryGroupImpl.GetAllGroups();
|
||||
if (string.IsNullOrWhiteSpace(groupName))
|
||||
{
|
||||
throw new ArgumentException("Имя группы не может быть пустым.");
|
||||
}
|
||||
}
|
||||
|
||||
public void GetGroupById(int id)
|
||||
private void ValidateGroupId(int GroupId)
|
||||
{
|
||||
_repositoryGroupImpl.GetGroupById(id);
|
||||
if(GroupId < 1)
|
||||
{
|
||||
throw new ArgumentException("Введите корректный ID группы.");
|
||||
}
|
||||
}
|
||||
|
||||
public void AddGroup(GroupLocalEntity group)
|
||||
// Приватный метод для валидации существования группы по ID
|
||||
private GroupDao ValidateGroupExistence(int groupId)
|
||||
{
|
||||
group.Id = _groups.Any() ? _groups.Max(g => g.Id) + 1 : 1;
|
||||
_repositoryGroupImpl.AddGroup(group);
|
||||
var existingGroup = _repositoryGroupImpl.GetAllGroups()
|
||||
.FirstOrDefault(g => g.Id == groupId);
|
||||
|
||||
if (existingGroup == null)
|
||||
{
|
||||
throw new ArgumentException("Группа не найдена.");
|
||||
}
|
||||
|
||||
return existingGroup;
|
||||
}
|
||||
|
||||
public void UpdateGroup(int id)
|
||||
|
||||
// Метод для получения списка всех групп
|
||||
public List<Group> GetAllGroups()
|
||||
{
|
||||
_repositoryGroupImpl.UpdateGroup(id);
|
||||
return [.. _repositoryGroupImpl.GetAllGroups()
|
||||
.Select(it => new Group { Id = it.Id, Name = it.Name })];
|
||||
}
|
||||
|
||||
|
||||
public void FindGroupById(int IdGroup)
|
||||
{
|
||||
List<Group> GetAllGroups()
|
||||
{
|
||||
return [.. _repositoryGroupImpl
|
||||
.GetAllGroups()
|
||||
.Select(
|
||||
it => new Group
|
||||
{ Id = it.Id, Name = it.Name }
|
||||
)
|
||||
];
|
||||
}
|
||||
foreach(var group in GetAllGroups())
|
||||
{
|
||||
if (IdGroup == group.Id)
|
||||
{
|
||||
Console.WriteLine($"ID группы: {group.Id} Название группы: {group.Name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Метод для добавления новой группы
|
||||
public void AddGroup(string groupName)
|
||||
{
|
||||
ValidateGroupName(groupName);
|
||||
|
||||
|
||||
|
||||
GroupLocalEntity newGroup = new GroupLocalEntity
|
||||
{
|
||||
Name = groupName
|
||||
};
|
||||
|
||||
_repositoryGroupImpl.AddGroup(newGroup.Name);
|
||||
}
|
||||
|
||||
|
||||
// Метод для изменения названия группы
|
||||
public void UpdateGroup(int groupId, string newGroupName)
|
||||
{
|
||||
ValidateGroupName(newGroupName);
|
||||
var existingGroup = ValidateGroupExistence(groupId);
|
||||
|
||||
existingGroup.Name = newGroupName;
|
||||
_repositoryGroupImpl.UpdateGroupById(groupId,existingGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
122
Demo/Domain/UseCase/UseCaseGeneratePresence.cs
Normal file
122
Demo/Domain/UseCase/UseCaseGeneratePresence.cs
Normal file
@ -0,0 +1,122 @@
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.Data.Repository;
|
||||
using Demo.domain.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Demo.Domain.UseCase
|
||||
{
|
||||
public class UseCaseGeneratePresence
|
||||
{
|
||||
public readonly IUserRepository _userRepository;
|
||||
public readonly IPresenceRepository _presenceRepository;
|
||||
|
||||
|
||||
public UseCaseGeneratePresence(IUserRepository userRepository, IPresenceRepository presenceRepository)
|
||||
{
|
||||
_userRepository = userRepository;
|
||||
_presenceRepository = presenceRepository;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<PresenceDao> GetPresenceByDateAndGroup(DateTime date, int groupId)
|
||||
{
|
||||
return _presenceRepository.GetPresenceByDateAndGroup(date, groupId);
|
||||
}
|
||||
|
||||
public void GeneratePresenceDaily(int firstLesson, int lastLesson, int groupId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var users = _userRepository.GetAllUsers().Where(u => u.GroupId == groupId).ToList();
|
||||
|
||||
// Находим последнюю дату посещаемости для данной группы
|
||||
DateOnly startDate = _presenceRepository.GetLastDateByGroupId(groupId)?.AddDays(1)
|
||||
?? DateOnly.FromDateTime(DateTime.Today);
|
||||
|
||||
List<PresenceDao> presences = new List<PresenceDao>();
|
||||
for (int lessonNumber = firstLesson; lessonNumber <= lastLesson; lessonNumber++)
|
||||
{
|
||||
foreach (var user in users)
|
||||
{
|
||||
var presence = new PresenceDao
|
||||
{
|
||||
UserId = user.UserId,
|
||||
GroupId = user.GroupId,
|
||||
Date = startDate,
|
||||
LessonNumber = lessonNumber,
|
||||
IsAttedance = true
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
_presenceRepository.SavePresence(new List<PresenceDao> { presence });
|
||||
Console.WriteLine($"Посещаемость добавлена для UserId = {user.UserId}, LessonNumber = {lessonNumber} на дату {startDate}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка при добавлении посещаемости для UserId = {user.UserId}: {ex.Message}");
|
||||
if (ex.InnerException != null)
|
||||
{
|
||||
Console.WriteLine($"Inner exception: {ex.InnerException.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка при генерации посещаемости: {ex.Message}");
|
||||
if (ex.InnerException != null)
|
||||
{
|
||||
Console.WriteLine($"Inner exception: {ex.InnerException.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void GenerateWeeklyPresence(int firstLesson, int lastLesson, int groupId, DateTime startTime)
|
||||
{
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
DateTime currentTime = startTime.AddDays(i);
|
||||
GeneratePresenceDaily(firstLesson, lastLesson, groupId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Отметить пользователя как отсутствующего на диапазоне занятий
|
||||
public void MarkUserAbsentForLessons(int userId, int groupId, int firstLesson, int lastLesson, DateTime date)
|
||||
{
|
||||
List<PresenceDao> presences = _presenceRepository.GetPresenceForAbsent(date, groupId);
|
||||
|
||||
// Обновляем состояние присутствия для указанных занятий
|
||||
foreach (var presence in presences.Where(p => p.UserId == userId && p.LessonNumber >= firstLesson && p.LessonNumber <= lastLesson))
|
||||
{
|
||||
presence.IsAttedance = false; // Устанавливаем отсутствие
|
||||
Console.WriteLine($"PresenceId: {presence.PresenceId}, UserId: {presence.UserId}, Lesson Num: {presence.LessonNumber}, Att: {presence.IsAttedance}");
|
||||
}
|
||||
// Сохраняем изменения в репозитории
|
||||
_presenceRepository.SavePresence(presences);
|
||||
}
|
||||
|
||||
public List<PresenceDao> GetAllPresenceByGroup(int groupId)
|
||||
{
|
||||
return _presenceRepository.GetPresenceByGroup(groupId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,82 +1,133 @@
|
||||
using Demo.Data.Repository;
|
||||
using Demo.Domain.Models;
|
||||
using Demo.Data.Exceptions; // Подключаем пространство имён для исключений
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Demo.Data.Exceptions;
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.Data.Repository;
|
||||
using Demo.domain.Models;
|
||||
|
||||
namespace Demo.Domain.UseCase
|
||||
{
|
||||
public class UserUseCase
|
||||
{
|
||||
private readonly UserRepositoryImpl _userRepository;
|
||||
private readonly IGroupRepository _groupRepository;
|
||||
private readonly IUserRepository _repositoryUserImpl;
|
||||
private readonly IGroupRepository _repositoryGroupImpl;
|
||||
|
||||
public UserUseCase(UserRepositoryImpl userRepository, IGroupRepository groupRepository)
|
||||
public UserUseCase(IUserRepository repositoryImpl, IGroupRepository repositoryGroupImpl)
|
||||
{
|
||||
_userRepository = userRepository;
|
||||
_groupRepository = groupRepository;
|
||||
_repositoryUserImpl = repositoryImpl;
|
||||
_repositoryGroupImpl = repositoryGroupImpl;
|
||||
}
|
||||
|
||||
// Получение всех групп
|
||||
private List<Group> GetAllGroups() =>
|
||||
_groupRepository.GetAllGroups()
|
||||
.Select(g => new Group { Id = g.Id, Name = g.Name })
|
||||
.ToList();
|
||||
// Приватный метод для валидации ФИО пользователя
|
||||
private void ValidateUserFIO(string fio)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(fio))
|
||||
{
|
||||
throw new ArgumentException("ФИО не может быть пустым.");
|
||||
}
|
||||
}
|
||||
|
||||
// Получение всех пользователей
|
||||
public List<User> GetAllUsers() =>
|
||||
_userRepository.GetAllUsers
|
||||
.Join(_groupRepository.GetAllGroups(),
|
||||
user => user.GroupID,
|
||||
group => group.Id,
|
||||
(user, group) => new User
|
||||
{
|
||||
FIO = user.FIO,
|
||||
Guid = user.Guid,
|
||||
Group = new Group { Id = group.Id, Name = group.Name }
|
||||
})
|
||||
.ToList();
|
||||
// Приватный метод для валидации существования пользователя по ID
|
||||
private UserDao ValidateUserExistence(int userId)
|
||||
{
|
||||
var user = _repositoryUserImpl.GetAllUsers()
|
||||
.FirstOrDefault(u => u.UserId == userId);
|
||||
|
||||
// Удаление пользователя по GUID
|
||||
public bool RemoveUserByGuid(Guid userGuid)
|
||||
if (user == null)
|
||||
{
|
||||
throw new Exception("Пользователь не найден.");
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
// Приватный метод для валидации существования группы по ID
|
||||
private GroupDao ValidateGroupExistence(int groupId)
|
||||
{
|
||||
var group = _repositoryGroupImpl.GetAllGroups()
|
||||
.FirstOrDefault(g => g.Id == groupId);
|
||||
|
||||
if (group == null)
|
||||
{
|
||||
throw new Exception("Группа не найдена.");
|
||||
}
|
||||
|
||||
return group;
|
||||
}
|
||||
|
||||
// Вывести всех пользователей
|
||||
public List<User> GetAllUsers() => _repositoryUserImpl.GetAllUsers()
|
||||
.Join(_repositoryGroupImpl.GetAllGroups(),
|
||||
user => user.GroupId, // Ключ для пользователей
|
||||
group => group.Id, // Ключ для групп
|
||||
(user, group) => // Результирующий объект
|
||||
new User
|
||||
{
|
||||
ID = user.UserId,
|
||||
FIO = user.FIO,
|
||||
Group = new Group { Id = group.Id, Name = group.Name }
|
||||
}).ToList();
|
||||
|
||||
// Удалить пользователя по id
|
||||
public bool RemoveUserById(int userId)
|
||||
{
|
||||
try
|
||||
{
|
||||
_userRepository.DeleteUserByGuid(userGuid);
|
||||
return true;
|
||||
return _repositoryUserImpl.RemoveUserById(userId);
|
||||
}
|
||||
catch (GuidNotFoundException)
|
||||
catch (UserNotFoundException ex)
|
||||
{
|
||||
// Логируем ошибку, если нужно
|
||||
Console.WriteLine($"Ошибка: {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
catch (RepositoryException ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка в репозитории: {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Обновление пользователя
|
||||
public User UpdateUser(User user)
|
||||
// Обновить пользователя по id
|
||||
public UserDao UpdateUser(UserDao user)
|
||||
{
|
||||
try
|
||||
{
|
||||
_userRepository.UpdateUser(user.Guid.ToString(), user.FIO, user.Group.Id);
|
||||
ValidateUserFIO(user.FIO);
|
||||
ValidateGroupExistence(user.GroupId);
|
||||
|
||||
var group = GetAllGroups().FirstOrDefault(g => g.Id == user.Group.Id);
|
||||
if (group == null)
|
||||
{
|
||||
throw new Exception($"Группа с ID {user.Group.Id} не найдена.");
|
||||
}
|
||||
UserDao userDao = new UserDao
|
||||
{
|
||||
UserId = user.UserId,
|
||||
FIO = user.FIO,
|
||||
GroupId = user.GroupId
|
||||
};
|
||||
|
||||
return new User { FIO = user.FIO, Guid = user.Guid, Group = group };
|
||||
}
|
||||
catch (GuidNotFoundException ex)
|
||||
UserDao? result = _repositoryUserImpl.UpdateUser(userDao);
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
throw new Exception("Пользователь не найден.", ex);
|
||||
throw new Exception("Ошибка при обновлении пользователя.");
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
|
||||
var groupEntity = ValidateGroupExistence(result.GroupId);
|
||||
|
||||
return new UserDao
|
||||
{
|
||||
throw new Exception("Некорректный GUID.", ex);
|
||||
}
|
||||
UserId=user.UserId,
|
||||
FIO = result.FIO,
|
||||
GroupId = result.GroupId
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// Найти пользователя по id
|
||||
public UserDao FindUserById(int userId)
|
||||
{
|
||||
var user = ValidateUserExistence(userId);
|
||||
var group = ValidateGroupExistence(user.GroupId);
|
||||
|
||||
return new UserDao
|
||||
{
|
||||
UserId = user.UserId,
|
||||
FIO = user.FIO,
|
||||
GroupId = group.Id
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
113
Demo/Migrations/20241101064613_InitialMigration.Designer.cs
generated
Normal file
113
Demo/Migrations/20241101064613_InitialMigration.Designer.cs
generated
Normal file
@ -0,0 +1,113 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Demo.Data.RemoteData.RemoteDataBase;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Demo.Migrations
|
||||
{
|
||||
[DbContext(typeof(RemoteDatabaseContext))]
|
||||
[Migration("20241101064613_InitialMigration")]
|
||||
partial class InitialMigration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Groups");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.PresenceDao", b =>
|
||||
{
|
||||
b.Property<int>("PresenceId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("PresenceId"));
|
||||
|
||||
b.Property<DateOnly>("Date")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<int>("GroupId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("IsAttedance")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("LessonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("PresenceId");
|
||||
|
||||
b.ToTable("PresenceDaos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDao", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserId"));
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("GroupId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
b.HasIndex("GroupId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDao", b =>
|
||||
{
|
||||
b.HasOne("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", "Group")
|
||||
.WithMany("Users")
|
||||
.HasForeignKey("GroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", b =>
|
||||
{
|
||||
b.Navigation("Users");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
84
Demo/Migrations/20241101064613_InitialMigration.cs
Normal file
84
Demo/Migrations/20241101064613_InitialMigration.cs
Normal file
@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Demo.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialMigration : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Groups",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
Name = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Groups", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PresenceDaos",
|
||||
columns: table => new
|
||||
{
|
||||
PresenceId = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
UserId = table.Column<int>(type: "integer", nullable: false),
|
||||
IsAttedance = table.Column<bool>(type: "boolean", nullable: false),
|
||||
Date = table.Column<DateOnly>(type: "date", nullable: false),
|
||||
LessonNumber = table.Column<int>(type: "integer", nullable: false),
|
||||
GroupId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PresenceDaos", x => x.PresenceId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Users",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
FIO = table.Column<string>(type: "text", nullable: false),
|
||||
GroupId = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Users", x => x.UserId);
|
||||
table.ForeignKey(
|
||||
name: "FK_Users_Groups_GroupId",
|
||||
column: x => x.GroupId,
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Users_GroupId",
|
||||
table: "Users",
|
||||
column: "GroupId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PresenceDaos");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Users");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Groups");
|
||||
}
|
||||
}
|
||||
}
|
110
Demo/Migrations/RemoteDatabaseContextModelSnapshot.cs
Normal file
110
Demo/Migrations/RemoteDatabaseContextModelSnapshot.cs
Normal file
@ -0,0 +1,110 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Demo.Data.RemoteData.RemoteDataBase;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Demo.Migrations
|
||||
{
|
||||
[DbContext(typeof(RemoteDatabaseContext))]
|
||||
partial class RemoteDatabaseContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.10")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Groups");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.PresenceDao", b =>
|
||||
{
|
||||
b.Property<int>("PresenceId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("PresenceId"));
|
||||
|
||||
b.Property<DateOnly>("Date")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<int>("GroupId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("IsAttedance")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("LessonNumber")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("PresenceId");
|
||||
|
||||
b.ToTable("PresenceDaos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDao", b =>
|
||||
{
|
||||
b.Property<int>("UserId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("UserId"));
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("GroupId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("UserId");
|
||||
|
||||
b.HasIndex("GroupId");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.UserDao", b =>
|
||||
{
|
||||
b.HasOne("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", "Group")
|
||||
.WithMany("Users")
|
||||
.HasForeignKey("GroupId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Demo.Data.RemoteData.RemoteDataBase.DAO.GroupDao", b =>
|
||||
{
|
||||
b.Navigation("Users");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +1,28 @@
|
||||
using Demo.Data.Repository;
|
||||
using Demo.Data.RemoteData.RemoteDataBase;
|
||||
using Demo.Data.Repository;
|
||||
using Demo.Domain.UseCase;
|
||||
using Demo.UI;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var userRepository = new UserRepositoryImpl();
|
||||
var groupRepository = new GroupRepositoryImpl();
|
||||
// Создаем экземпляр репозиториев
|
||||
|
||||
var userUseCase = new UserUseCase(userRepository,groupRepository);
|
||||
var groupUseCase = new GroupUseCase(groupRepository);
|
||||
IServiceCollection services = new ServiceCollection();
|
||||
|
||||
var userConsole = new UserConsole(userUseCase);
|
||||
var groupConsole = new GroupConsole(groupUseCase);
|
||||
services
|
||||
.AddDbContext<RemoteDatabaseContext>()
|
||||
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
|
||||
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
|
||||
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
|
||||
.AddSingleton<UserUseCase>()
|
||||
.AddSingleton<GroupUseCase>()
|
||||
.AddSingleton<UseCaseGeneratePresence>()
|
||||
.AddSingleton<MainMenuUI>();
|
||||
|
||||
var mainMenu = new MainMenu(userConsole, groupConsole);
|
||||
mainMenu.ShowMenu();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var serviceProvider = services.BuildServiceProvider();
|
||||
// Создаем пользовательский интерфейс
|
||||
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
|
||||
|
||||
// Выводим главное меню
|
||||
mainMenuUI.DisplayMenu();
|
||||
|
@ -1,47 +1,57 @@
|
||||
using Demo.Data.Repository;
|
||||
using Demo.domain.Models;
|
||||
using Demo.Domain.Models;
|
||||
using Demo.Domain.UseCase;
|
||||
using Demo.Domain.UseCase;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Demo.UI
|
||||
{
|
||||
public class GroupConsole
|
||||
public class GroupConsoleUI
|
||||
{
|
||||
private readonly GroupUseCase _groupUseCase;
|
||||
|
||||
public GroupConsole(GroupUseCase groupUseCase)
|
||||
public GroupConsoleUI(GroupUseCase groupUseCase)
|
||||
{
|
||||
_groupUseCase = groupUseCase;
|
||||
}
|
||||
|
||||
public void GetGroupById(int id)
|
||||
public void FindGroupById(int IdGroup)
|
||||
{
|
||||
_groupUseCase.GetGroupById(id);
|
||||
|
||||
_groupUseCase.FindGroupById(IdGroup);
|
||||
}
|
||||
|
||||
public void ShowAllGroups()
|
||||
// Метод для отображения всех групп
|
||||
public void DisplayAllGroups()
|
||||
{
|
||||
var groups = _groupUseCase.GetAllGroups();
|
||||
foreach (var group in groups)
|
||||
Console.WriteLine("\n=== Список всех групп ===");
|
||||
StringBuilder groupOutput = new StringBuilder();
|
||||
|
||||
foreach (var group in _groupUseCase.GetAllGroups())
|
||||
{
|
||||
Console.WriteLine($"Group ID: {group.Id}, Name: {group.Name}");
|
||||
groupOutput.AppendLine($"{group.Id}\t{group.Name}");
|
||||
}
|
||||
|
||||
Console.WriteLine(groupOutput);
|
||||
Console.WriteLine("===========================\n");
|
||||
}
|
||||
|
||||
// Метод для добавления новой группы
|
||||
public void AddGroup(string groupName)
|
||||
{
|
||||
try
|
||||
{
|
||||
_groupUseCase.AddGroup(groupName);
|
||||
Console.WriteLine($"\nГруппа {groupName} добавлена.\n");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка: {ex.Message}\n");
|
||||
}
|
||||
}
|
||||
|
||||
public void AddGroup(string Name)
|
||||
// Метод для обновления названия группы
|
||||
public void UpdateGroupName(int groupId, string newGroupName)
|
||||
{
|
||||
GroupLocalEntity newGroup = new GroupLocalEntity { Name = Name };
|
||||
_groupUseCase.AddGroup(newGroup);
|
||||
Console.WriteLine("Group added successfully.");
|
||||
}
|
||||
|
||||
public void UpdateGroup(int groupId)
|
||||
{
|
||||
Console.WriteLine("Enter new Group Name:");
|
||||
_groupUseCase.UpdateGroup(groupId);
|
||||
Console.WriteLine("Group updated successfully.");
|
||||
_groupUseCase.UpdateGroup(groupId, newGroupName);
|
||||
Console.WriteLine($"\nНазвание группы с ID {groupId} изменено на {newGroupName}.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,107 +1,219 @@
|
||||
using Demo.UI;
|
||||
using Demo.domain.Models;
|
||||
using Demo.Domain.UseCase;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Demo.UI
|
||||
{
|
||||
public class MainMenu
|
||||
public class MainMenuUI
|
||||
{
|
||||
private readonly UserConsole _userConsole;
|
||||
private readonly GroupConsole _groupConsole;
|
||||
private readonly UserConsoleUI _userConsoleUI;
|
||||
private readonly GroupConsoleUI _groupConsoleUI;
|
||||
private readonly PresenceConsole _presenceConsoleUI;
|
||||
|
||||
public MainMenu(UserConsole userConsole, GroupConsole groupConsole)
|
||||
public MainMenuUI(UserUseCase userUseCase, GroupUseCase groupUseCase, UseCaseGeneratePresence presenceUseCase)
|
||||
{
|
||||
_userConsole = userConsole;
|
||||
_groupConsole = groupConsole;
|
||||
_userConsoleUI = new UserConsoleUI(userUseCase);
|
||||
_groupConsoleUI = new GroupConsoleUI(groupUseCase);
|
||||
_presenceConsoleUI = new PresenceConsole(presenceUseCase);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void ShowMenu()
|
||||
public void DisplayMenu()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Console.WriteLine("1. Показать всех пользователей");
|
||||
Console.WriteLine("2. Показать все группы");
|
||||
Console.WriteLine("3. Добавить группу");
|
||||
Console.WriteLine("4. Обновить группу");
|
||||
Console.WriteLine("5. Найти группу по id");
|
||||
Console.WriteLine("6. Обновить пользователя");
|
||||
Console.WriteLine("7. Удалить пользователя");
|
||||
Console.WriteLine("8. Найти пользователя");
|
||||
Console.WriteLine("9. Выход");
|
||||
Console.WriteLine("Выберете команду:");
|
||||
Console.WriteLine("\n=-= Главное меню =-=\n");
|
||||
|
||||
string choice = Console.ReadLine();
|
||||
switch (choice)
|
||||
Console.WriteLine("=-= Команды с Пользователями =-=");
|
||||
Console.WriteLine("1. Вывести всех пользователей");
|
||||
Console.WriteLine("2. Удалить пользователя по id");
|
||||
Console.WriteLine("3. Обновить пользователя по id");
|
||||
Console.WriteLine("4. Найти пользователя по id");
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine("=-= Команды с Группами =-=");
|
||||
Console.WriteLine("5. Вывести все группы");
|
||||
Console.WriteLine("6. Добавить группу");
|
||||
Console.WriteLine("7. Изменить название группы");
|
||||
Console.WriteLine("8. Поиск группы по ID");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("=-= Команды Presence =-=");
|
||||
Console.WriteLine("9. Сгенерировать посещаемость на день");
|
||||
Console.WriteLine("10. Сгенерировать посещаемость на неделю");
|
||||
Console.WriteLine("11. Показать посещаемость");
|
||||
Console.WriteLine("12. Отметить пользователя как отсутствующего");
|
||||
Console.WriteLine("13. Вывести всю посещаемость группы");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("0. Выход");
|
||||
|
||||
Console.Write("\nВаш выбор: ");
|
||||
string comand = Console.ReadLine();
|
||||
Console.WriteLine();
|
||||
|
||||
switch (comand)
|
||||
{
|
||||
case "1":
|
||||
_userConsole.ShowAllUsers();
|
||||
// Отображение всех пользователей
|
||||
_userConsoleUI.DisplayAllUsers();
|
||||
break;
|
||||
|
||||
case "2":
|
||||
_groupConsole.ShowAllGroups();
|
||||
// Удаление пользователя по ID
|
||||
Console.Write("Введите ID пользователя для удаления: ");
|
||||
string inputId = Console.ReadLine();
|
||||
if (int.TryParse(inputId, out int userId))
|
||||
{
|
||||
_userConsoleUI.RemoveUserById(userId);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Неверный формат ID");
|
||||
}
|
||||
break;
|
||||
|
||||
case "3":
|
||||
// Обновление пользователя по ID
|
||||
Console.Write("Введите ID пользователя для обновления: ");
|
||||
string updateIdInput = Console.ReadLine();
|
||||
if (int.TryParse(updateIdInput, out int updateUserId))
|
||||
{
|
||||
_userConsoleUI.UpdateUserById(updateUserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Неверный формат ID");
|
||||
}
|
||||
break;
|
||||
|
||||
case "4":
|
||||
// Поиск пользователя по ID
|
||||
Console.Write("Введите ID пользователя для поиска: ");
|
||||
string findIdInput = Console.ReadLine();
|
||||
if (int.TryParse(findIdInput, out int findUserId))
|
||||
{
|
||||
_userConsoleUI.FindUserById(findUserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Неверный формат ID");
|
||||
}
|
||||
break;
|
||||
|
||||
case "5":
|
||||
// Отображение всех групп
|
||||
_groupConsoleUI.DisplayAllGroups();
|
||||
break;
|
||||
|
||||
case "6":
|
||||
// Добавление новой группы
|
||||
Console.Write("Введите название новой группы: ");
|
||||
string newGroupName = Console.ReadLine();
|
||||
_groupConsole.AddGroup(newGroupName);
|
||||
_groupConsoleUI.AddGroup(newGroupName);
|
||||
break;
|
||||
case "4":
|
||||
Console.WriteLine("Введите ID группы:");
|
||||
|
||||
case "7":
|
||||
// Изменение названия группы
|
||||
Console.Write("Введите ID группы для изменения: ");
|
||||
if (int.TryParse(Console.ReadLine(), out int groupId))
|
||||
{
|
||||
_groupConsole.UpdateGroup(groupId);
|
||||
Console.Write("Введите новое название группы: ");
|
||||
string newName = Console.ReadLine();
|
||||
_groupConsoleUI.UpdateGroupName(groupId, newName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Ошибка: Введите корректный идентификатор группы.");
|
||||
}
|
||||
break;
|
||||
case "5":
|
||||
Console.WriteLine("Введите id группы");
|
||||
int id = int.Parse(Console.ReadLine());
|
||||
_groupConsole.GetGroupById(id);
|
||||
break;
|
||||
case "6":
|
||||
Console.WriteLine("Введите юзер GUID:");
|
||||
if (Guid.TryParse(Console.ReadLine(), out Guid userGuid))
|
||||
{
|
||||
_userConsole.UpdateUser(userGuid);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Ошибка: Введите корректный GUID пользователя.");
|
||||
}
|
||||
break;
|
||||
case "7":
|
||||
Console.WriteLine("Введите юзер GUID:");
|
||||
if (Guid.TryParse(Console.ReadLine(), out userGuid))
|
||||
{
|
||||
_userConsole.DeleteUser(userGuid);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Ошибка: Введите корректный GUID пользователя.");
|
||||
Console.WriteLine("Неверный формат ID группы");
|
||||
}
|
||||
break;
|
||||
|
||||
case "8":
|
||||
Console.WriteLine("Введите юзер GUID:");
|
||||
if (Guid.TryParse(Console.ReadLine(), out userGuid))
|
||||
// Поиск группы
|
||||
Console.Write("Введите ID группы для поиска : ");
|
||||
if (int.TryParse(Console.ReadLine(), out int IdGroup))
|
||||
{
|
||||
_userConsole.FindUser(userGuid);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Ошибка: Введите корректный GUID пользователя.");
|
||||
_groupConsoleUI.FindGroupById(IdGroup);
|
||||
}
|
||||
break;
|
||||
|
||||
case "9":
|
||||
// Генерация посещаемости на день
|
||||
Console.Write("Введите номер первого занятия: ");
|
||||
int firstLesson = int.Parse(Console.ReadLine());
|
||||
Console.Write("Введите номер последнего занятия: ");
|
||||
int lastLesson = int.Parse(Console.ReadLine());
|
||||
Console.Write("Введите ID группы: ");
|
||||
int groupIdForPresence = int.Parse(Console.ReadLine());
|
||||
|
||||
_presenceConsoleUI.GeneratePresenceForDay(DateTime.Now, groupIdForPresence, firstLesson, lastLesson);
|
||||
Console.WriteLine("Посещаемость на день сгенерирована.");
|
||||
break;
|
||||
|
||||
case "10":
|
||||
// Генерация посещаемости на неделю
|
||||
Console.Write("Введите номер первого занятия: ");
|
||||
int firstLessonForWeek = int.Parse(Console.ReadLine());
|
||||
Console.Write("Введите номер последнего занятия: ");
|
||||
int lastLessonForWeek = int.Parse(Console.ReadLine());
|
||||
Console.Write("Введите ID группы: ");
|
||||
int groupIdForWeekPresence = int.Parse(Console.ReadLine());
|
||||
|
||||
_presenceConsoleUI.GeneratePresenceForWeek(DateTime.Now, groupIdForWeekPresence, firstLessonForWeek, lastLessonForWeek);
|
||||
Console.WriteLine("Посещаемость на неделю сгенерирована.");
|
||||
break;
|
||||
|
||||
case "11":
|
||||
// Отображение посещаемости
|
||||
Console.Write("Введите дату (гггг-мм-дд): ");
|
||||
DateTime date = DateTime.Parse(Console.ReadLine());
|
||||
Console.Write("Введите ID группы: ");
|
||||
int groupForPresenceView = int.Parse(Console.ReadLine());
|
||||
|
||||
_presenceConsoleUI.DisplayPresence(date, groupForPresenceView);
|
||||
break;
|
||||
|
||||
case "12":
|
||||
// Отметить пользователя как отсутствующего
|
||||
Console.Write("Введите ID пользователя: ");
|
||||
userId = int.Parse(Console.ReadLine());
|
||||
Console.Write("Введите номер первого занятия: ");
|
||||
int firstAbsLesson = int.Parse(Console.ReadLine());
|
||||
Console.Write("Введите номер последнего занятия: ");
|
||||
int lastAbsLesson = int.Parse(Console.ReadLine());
|
||||
Console.Write("Введите ID группы: ");
|
||||
int absGroupId = int.Parse(Console.ReadLine());
|
||||
|
||||
Console.Write("Введите дату (дд.мм.гггг): ");
|
||||
string dateInput = Console.ReadLine();
|
||||
DateTime absenceDate;
|
||||
|
||||
if (!DateTime.TryParseExact(dateInput, "d.M.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out absenceDate))
|
||||
{
|
||||
Console.WriteLine("Ошибка: Введен некорректный формат даты. Пожалуйста, используйте формат дд.мм.гггг.");
|
||||
return; // Завершает выполнение, если дата некорректна
|
||||
}
|
||||
_presenceConsoleUI.MarkUserAbsent(absenceDate, absGroupId, userId, firstAbsLesson, lastAbsLesson);
|
||||
Console.WriteLine("Пользователь отмечен как отсутствующий.");
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case "13":
|
||||
Console.Write("Введите ID группы: ");
|
||||
int groupIdForAllPresence = int.Parse(Console.ReadLine());
|
||||
_presenceConsoleUI.DisplayAllPresenceByGroup(groupIdForAllPresence);
|
||||
break;
|
||||
|
||||
|
||||
case "0":
|
||||
Console.WriteLine("Выход...");
|
||||
return;
|
||||
|
||||
default:
|
||||
Console.WriteLine("Ошибка: Выберите корректный пункт меню.");
|
||||
Console.WriteLine("Неверный выбор, попробуйте снова.");
|
||||
break;
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
148
Demo/UI/PresenceConsole.cs
Normal file
148
Demo/UI/PresenceConsole.cs
Normal file
@ -0,0 +1,148 @@
|
||||
using Demo.Data.RemoteData.RemoteDataBase.DAO;
|
||||
using Demo.domain.Models;
|
||||
using Demo.Domain.UseCase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Demo.UI
|
||||
{
|
||||
public class PresenceConsole
|
||||
{
|
||||
private readonly UseCaseGeneratePresence _presenceUseCase;
|
||||
|
||||
public PresenceConsole(UseCaseGeneratePresence presenceUseCase)
|
||||
{
|
||||
_presenceUseCase = presenceUseCase;
|
||||
}
|
||||
|
||||
// Метод для генерации посещаемости на день
|
||||
public void GeneratePresenceForDay(DateTime date, int groupId, int firstLesson, int lastLesson)
|
||||
{
|
||||
try
|
||||
{
|
||||
_presenceUseCase.GeneratePresenceDaily(firstLesson, lastLesson, groupId);
|
||||
Console.WriteLine("Посещаемость на день успешно сгенерирована.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка при генерации посещаемости: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
// Метод для генерации посещаемости на неделю
|
||||
public void GeneratePresenceForWeek(DateTime date, int groupId, int firstLesson, int lastLesson)
|
||||
{
|
||||
try
|
||||
{
|
||||
_presenceUseCase.GenerateWeeklyPresence(firstLesson, lastLesson, groupId, date);
|
||||
Console.WriteLine("Посещаемость на неделю успешно сгенерирована.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка при генерации посещаемости: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
// Метод для отображения посещаемости на конкретную дату и группу
|
||||
public void DisplayPresence(DateTime date, int groupId)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<PresenceDao> presences = _presenceUseCase.GetPresenceByDateAndGroup(date, groupId);
|
||||
|
||||
if (presences == null || presences.Count == 0)
|
||||
{
|
||||
Console.WriteLine("Посещаемость на выбранную дату отсутствует.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Сортируем присутствия по номеру занятия и ID пользователя
|
||||
var sortedPresences = presences.OrderBy(p => p.LessonNumber)
|
||||
.ThenBy(p => p.UserId);
|
||||
|
||||
Console.WriteLine($"\nПосещаемость на {date.ToShortDateString()} для группы с ID {groupId}:");
|
||||
Console.WriteLine("---------------------------------------------");
|
||||
|
||||
int previousLessonNumber = -1; // Инициализация для сравнения
|
||||
foreach (var presence in sortedPresences)
|
||||
{
|
||||
if (previousLessonNumber != presence.LessonNumber)
|
||||
{
|
||||
Console.WriteLine("---------------------------------------------");
|
||||
previousLessonNumber = presence.LessonNumber;
|
||||
}
|
||||
string status = presence.IsAttedance ? "Присутствует" : "Отсутствует";
|
||||
Console.WriteLine($"Пользователь ID: {presence.UserId}, Занятие {presence.LessonNumber}: {status}");
|
||||
}
|
||||
Console.WriteLine("---------------------------------------------");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка при выводе посещаемости: {ex.Message}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void MarkUserAbsent(DateTime date, int groupId, int userId, int firstLesson, int lastLesson)
|
||||
{
|
||||
_presenceUseCase.MarkUserAbsentForLessons(userId, groupId, firstLesson, lastLesson, date);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void DisplayAllPresenceByGroup(int groupId)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Получаем все посещения для группы
|
||||
var presences = _presenceUseCase.GetAllPresenceByGroup(groupId);
|
||||
|
||||
if (presences == null || presences.Count == 0)
|
||||
{
|
||||
Console.WriteLine($"Посещаемость для группы с ID {groupId} отсутствует.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Группируем по дате
|
||||
var groupedPresences = presences.GroupBy(p => p.Date);
|
||||
|
||||
foreach (var group in groupedPresences)
|
||||
{
|
||||
Console.WriteLine("===================================================");
|
||||
Console.WriteLine($"Дата: {group.Key.ToString("dd.MM.yyyy")}");
|
||||
Console.WriteLine("===================================================");
|
||||
|
||||
// Группируем по занятию
|
||||
var groupedByLesson = group.GroupBy(p => p.LessonNumber);
|
||||
|
||||
foreach (var lessonGroup in groupedByLesson)
|
||||
{
|
||||
Console.WriteLine($"Занятие {lessonGroup.Key}:");
|
||||
|
||||
// Создаем HashSet для уникальных пользователей
|
||||
var userIds = new HashSet<int>();
|
||||
|
||||
foreach (var presence in lessonGroup)
|
||||
{
|
||||
// Проверяем, добавляется ли пользователь в HashSet
|
||||
if (userIds.Add(presence.UserId))
|
||||
{
|
||||
string status = presence.IsAttedance ? "Присутствует" : "Отсутствует";
|
||||
Console.WriteLine($"Пользователь ID: {presence.UserId}, Статус: {status}");
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("---------------------------------------------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка при выводе посещаемости: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,67 +1,74 @@
|
||||
using Demo.domain.Models;
|
||||
using Demo.Domain.UseCase;
|
||||
using Demo.Domain.UseCase;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Demo.UI
|
||||
{
|
||||
public class UserConsole
|
||||
public class UserConsoleUI
|
||||
{
|
||||
private readonly UserUseCase _userUseCase;
|
||||
|
||||
public UserConsole(UserUseCase userUseCase)
|
||||
public UserConsoleUI(UserUseCase userUseCase)
|
||||
{
|
||||
_userUseCase = userUseCase;
|
||||
}
|
||||
|
||||
public void ShowAllUsers()
|
||||
// Метод для отображения всех пользователей
|
||||
public void DisplayAllUsers()
|
||||
{
|
||||
var users = _userUseCase.GetAllUsers();
|
||||
if (users.Count == 0)
|
||||
Console.WriteLine("\n=== Список всех пользователей ===");
|
||||
StringBuilder userOutput = new StringBuilder();
|
||||
|
||||
foreach (var user in _userUseCase.GetAllUsers())
|
||||
{
|
||||
Console.WriteLine("No users found.");
|
||||
return;
|
||||
userOutput.AppendLine($"{user.ID}\t{user.FIO}\t{user.Group.Name}");
|
||||
}
|
||||
|
||||
foreach (var user in users)
|
||||
Console.WriteLine(userOutput);
|
||||
Console.WriteLine("===============================\n");
|
||||
}
|
||||
|
||||
// Метод для удаления пользователя по ID
|
||||
public void RemoveUserById(int userId)
|
||||
{
|
||||
string output = _userUseCase.RemoveUserById(userId) ? "Пользователь удален" : "Пользователь не найден";
|
||||
Console.WriteLine($"\n{output}\n");
|
||||
}
|
||||
|
||||
// Метод для обновления пользователя по ID
|
||||
public void UpdateUserById(int userId)
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine($"User GUID: {user.Guid}, FIO: {user.FIO}, Group ID: {user.Group.Id}");
|
||||
var user = _userUseCase.FindUserById(userId);
|
||||
|
||||
|
||||
Console.WriteLine($"Текущие данные: {user.FIO}");
|
||||
Console.Write("\nВведите новое ФИО: ");
|
||||
string newFIO = Console.ReadLine();
|
||||
|
||||
user.FIO = newFIO;
|
||||
_userUseCase.UpdateUser(user);
|
||||
|
||||
Console.WriteLine("\nПользователь обновлен.\n");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Ошибка: {ex.Message}\n");
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateUser(Guid userGuid)
|
||||
// Метод для поиска пользователя по ID
|
||||
public void FindUserById(int userId)
|
||||
{
|
||||
Console.WriteLine("Enter new FIO:");
|
||||
string newFIO = Console.ReadLine();
|
||||
Console.WriteLine("Enter new Group ID:");
|
||||
int newGroupID = int.Parse(Console.ReadLine());
|
||||
|
||||
var user = new User
|
||||
{
|
||||
Guid = userGuid,
|
||||
FIO = newFIO,
|
||||
Group = new Group { Id = newGroupID }
|
||||
};
|
||||
|
||||
_userUseCase.UpdateUser(user);
|
||||
Console.WriteLine("User updated successfully.");
|
||||
}
|
||||
|
||||
public void DeleteUser(Guid userGuid)
|
||||
{
|
||||
_userUseCase.RemoveUserByGuid(userGuid);
|
||||
Console.WriteLine("User deleted successfully.");
|
||||
}
|
||||
|
||||
public void FindUser(Guid userGuid)
|
||||
{
|
||||
var user = _userUseCase.GetAllUsers().FirstOrDefault(u => u.Guid == userGuid);
|
||||
var user = _userUseCase.FindUserById(userId);
|
||||
if (user != null)
|
||||
{
|
||||
Console.WriteLine($"User found: {user.FIO}, Group ID: {user.Group.Id}");
|
||||
Console.WriteLine($"\nПользователь найден: {user.UserId}, {user.FIO}, {user.Group.Name}\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("User not found.");
|
||||
Console.WriteLine("\nПользователь не найден.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,540 @@
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"Demo/1.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.EntityFrameworkCore": "8.0.10",
|
||||
"Microsoft.EntityFrameworkCore.Design": "8.0.10",
|
||||
"Microsoft.Extensions.DependencyInjection": "8.0.1",
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.10"
|
||||
},
|
||||
"runtime": {
|
||||
"Demo.dll": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Humanizer.Core/2.14.1": {
|
||||
"runtime": {
|
||||
"lib/net6.0/Humanizer.dll": {
|
||||
"assemblyVersion": "2.14.0.0",
|
||||
"fileVersion": "2.14.1.48190"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Bcl.AsyncInterfaces/6.0.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Analyzers/3.3.3": {},
|
||||
"Microsoft.CodeAnalysis.Common/4.5.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.CodeAnalysis.Analyzers": "3.3.3",
|
||||
"System.Collections.Immutable": "6.0.0",
|
||||
"System.Reflection.Metadata": "6.0.1",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
|
||||
"System.Text.Encoding.CodePages": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.1/Microsoft.CodeAnalysis.dll": {
|
||||
"assemblyVersion": "4.5.0.0",
|
||||
"fileVersion": "4.500.23.10905"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "cs"
|
||||
},
|
||||
"lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "de"
|
||||
},
|
||||
"lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "es"
|
||||
},
|
||||
"lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "fr"
|
||||
},
|
||||
"lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "it"
|
||||
},
|
||||
"lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "ja"
|
||||
},
|
||||
"lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "ko"
|
||||
},
|
||||
"lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "pl"
|
||||
},
|
||||
"lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "pt-BR"
|
||||
},
|
||||
"lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "ru"
|
||||
},
|
||||
"lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "tr"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "zh-Hans"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "zh-Hant"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CodeAnalysis.CSharp/4.5.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.CodeAnalysis.Common": "4.5.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.dll": {
|
||||
"assemblyVersion": "4.5.0.0",
|
||||
"fileVersion": "4.500.23.10905"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "cs"
|
||||
},
|
||||
"lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "de"
|
||||
},
|
||||
"lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "es"
|
||||
},
|
||||
"lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "fr"
|
||||
},
|
||||
"lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "it"
|
||||
},
|
||||
"lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "ja"
|
||||
},
|
||||
"lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "ko"
|
||||
},
|
||||
"lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "pl"
|
||||
},
|
||||
"lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "pt-BR"
|
||||
},
|
||||
"lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "ru"
|
||||
},
|
||||
"lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "tr"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "zh-Hans"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "zh-Hant"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CodeAnalysis.CSharp.Workspaces/4.5.0": {
|
||||
"dependencies": {
|
||||
"Humanizer.Core": "2.14.1",
|
||||
"Microsoft.CodeAnalysis.CSharp": "4.5.0",
|
||||
"Microsoft.CodeAnalysis.Common": "4.5.0",
|
||||
"Microsoft.CodeAnalysis.Workspaces.Common": "4.5.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.Workspaces.dll": {
|
||||
"assemblyVersion": "4.5.0.0",
|
||||
"fileVersion": "4.500.23.10905"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "cs"
|
||||
},
|
||||
"lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "de"
|
||||
},
|
||||
"lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "es"
|
||||
},
|
||||
"lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "fr"
|
||||
},
|
||||
"lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "it"
|
||||
},
|
||||
"lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "ja"
|
||||
},
|
||||
"lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "ko"
|
||||
},
|
||||
"lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "pl"
|
||||
},
|
||||
"lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "pt-BR"
|
||||
},
|
||||
"lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "ru"
|
||||
},
|
||||
"lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "tr"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "zh-Hans"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll": {
|
||||
"locale": "zh-Hant"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Workspaces.Common/4.5.0": {
|
||||
"dependencies": {
|
||||
"Humanizer.Core": "2.14.1",
|
||||
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
|
||||
"Microsoft.CodeAnalysis.Common": "4.5.0",
|
||||
"System.Composition": "6.0.0",
|
||||
"System.IO.Pipelines": "6.0.3",
|
||||
"System.Threading.Channels": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netcoreapp3.1/Microsoft.CodeAnalysis.Workspaces.dll": {
|
||||
"assemblyVersion": "4.5.0.0",
|
||||
"fileVersion": "4.500.23.10905"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"lib/netcoreapp3.1/cs/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "cs"
|
||||
},
|
||||
"lib/netcoreapp3.1/de/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "de"
|
||||
},
|
||||
"lib/netcoreapp3.1/es/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "es"
|
||||
},
|
||||
"lib/netcoreapp3.1/fr/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "fr"
|
||||
},
|
||||
"lib/netcoreapp3.1/it/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "it"
|
||||
},
|
||||
"lib/netcoreapp3.1/ja/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "ja"
|
||||
},
|
||||
"lib/netcoreapp3.1/ko/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "ko"
|
||||
},
|
||||
"lib/netcoreapp3.1/pl/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "pl"
|
||||
},
|
||||
"lib/netcoreapp3.1/pt-BR/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "pt-BR"
|
||||
},
|
||||
"lib/netcoreapp3.1/ru/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "ru"
|
||||
},
|
||||
"lib/netcoreapp3.1/tr/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "tr"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hans/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "zh-Hans"
|
||||
},
|
||||
"lib/netcoreapp3.1/zh-Hant/Microsoft.CodeAnalysis.Workspaces.resources.dll": {
|
||||
"locale": "zh-Hant"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore/8.0.10": {
|
||||
"dependencies": {
|
||||
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.10",
|
||||
"Microsoft.EntityFrameworkCore.Analyzers": "8.0.10",
|
||||
"Microsoft.Extensions.Caching.Memory": "8.0.1",
|
||||
"Microsoft.Extensions.Logging": "8.0.1"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.dll": {
|
||||
"assemblyVersion": "8.0.10.0",
|
||||
"fileVersion": "8.0.1024.46708"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Abstractions/8.0.10": {
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.Abstractions.dll": {
|
||||
"assemblyVersion": "8.0.10.0",
|
||||
"fileVersion": "8.0.1024.46708"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Analyzers/8.0.10": {},
|
||||
"Microsoft.EntityFrameworkCore.Design/8.0.10": {
|
||||
"dependencies": {
|
||||
"Humanizer.Core": "2.14.1",
|
||||
"Microsoft.CodeAnalysis.CSharp.Workspaces": "4.5.0",
|
||||
"Microsoft.EntityFrameworkCore.Relational": "8.0.10",
|
||||
"Microsoft.Extensions.DependencyModel": "8.0.2",
|
||||
"Mono.TextTemplating": "2.2.1"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.Design.dll": {
|
||||
"assemblyVersion": "8.0.10.0",
|
||||
"fileVersion": "8.0.1024.46708"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Relational/8.0.10": {
|
||||
"dependencies": {
|
||||
"Microsoft.EntityFrameworkCore": "8.0.10",
|
||||
"Microsoft.Extensions.Configuration.Abstractions": "8.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.EntityFrameworkCore.Relational.dll": {
|
||||
"assemblyVersion": "8.0.10.0",
|
||||
"fileVersion": "8.0.1024.46708"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Caching.Abstractions/8.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Primitives": "8.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.Caching.Abstractions.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.23.53103"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Caching.Memory/8.0.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Caching.Abstractions": "8.0.0",
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "8.0.2",
|
||||
"Microsoft.Extensions.Options": "8.0.2",
|
||||
"Microsoft.Extensions.Primitives": "8.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.Caching.Memory.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.1024.46610"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Configuration.Abstractions/8.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Primitives": "8.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.Configuration.Abstractions.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.23.53103"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.DependencyInjection/8.0.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.DependencyInjection.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.1024.46610"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions/8.0.2": {
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.1024.46610"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.DependencyModel/8.0.2": {
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.DependencyModel.dll": {
|
||||
"assemblyVersion": "8.0.0.2",
|
||||
"fileVersion": "8.0.1024.46610"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Logging/8.0.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyInjection": "8.0.1",
|
||||
"Microsoft.Extensions.Logging.Abstractions": "8.0.2",
|
||||
"Microsoft.Extensions.Options": "8.0.2"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.Logging.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.1024.46610"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/8.0.2": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.1024.46610"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Options/8.0.2": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2",
|
||||
"Microsoft.Extensions.Primitives": "8.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.Options.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.224.6711"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.Extensions.Primitives/8.0.0": {
|
||||
"runtime": {
|
||||
"lib/net8.0/Microsoft.Extensions.Primitives.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.23.53103"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mono.TextTemplating/2.2.1": {
|
||||
"dependencies": {
|
||||
"System.CodeDom": "4.4.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Mono.TextTemplating.dll": {
|
||||
"assemblyVersion": "2.2.0.0",
|
||||
"fileVersion": "2.2.1.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Npgsql/8.0.5": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Logging.Abstractions": "8.0.2"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Npgsql.dll": {
|
||||
"assemblyVersion": "8.0.5.0",
|
||||
"fileVersion": "8.0.5.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL/8.0.10": {
|
||||
"dependencies": {
|
||||
"Microsoft.EntityFrameworkCore": "8.0.10",
|
||||
"Microsoft.EntityFrameworkCore.Abstractions": "8.0.10",
|
||||
"Microsoft.EntityFrameworkCore.Relational": "8.0.10",
|
||||
"Npgsql": "8.0.5"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll": {
|
||||
"assemblyVersion": "8.0.10.0",
|
||||
"fileVersion": "8.0.10.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.CodeDom/4.4.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.CodeDom.dll": {
|
||||
"assemblyVersion": "4.0.0.0",
|
||||
"fileVersion": "4.6.25519.3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Collections.Immutable/6.0.0": {
|
||||
"dependencies": {
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
}
|
||||
},
|
||||
"System.Composition/6.0.0": {
|
||||
"dependencies": {
|
||||
"System.Composition.AttributedModel": "6.0.0",
|
||||
"System.Composition.Convention": "6.0.0",
|
||||
"System.Composition.Hosting": "6.0.0",
|
||||
"System.Composition.Runtime": "6.0.0",
|
||||
"System.Composition.TypedParts": "6.0.0"
|
||||
}
|
||||
},
|
||||
"System.Composition.AttributedModel/6.0.0": {
|
||||
"runtime": {
|
||||
"lib/net6.0/System.Composition.AttributedModel.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Composition.Convention/6.0.0": {
|
||||
"dependencies": {
|
||||
"System.Composition.AttributedModel": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/System.Composition.Convention.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Composition.Hosting/6.0.0": {
|
||||
"dependencies": {
|
||||
"System.Composition.Runtime": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/System.Composition.Hosting.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Composition.Runtime/6.0.0": {
|
||||
"runtime": {
|
||||
"lib/net6.0/System.Composition.Runtime.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Composition.TypedParts/6.0.0": {
|
||||
"dependencies": {
|
||||
"System.Composition.AttributedModel": "6.0.0",
|
||||
"System.Composition.Hosting": "6.0.0",
|
||||
"System.Composition.Runtime": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/System.Composition.TypedParts.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.IO.Pipelines/6.0.3": {
|
||||
"runtime": {
|
||||
"lib/net6.0/System.IO.Pipelines.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.522.21309"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Reflection.Metadata/6.0.1": {
|
||||
"dependencies": {
|
||||
"System.Collections.Immutable": "6.0.0"
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {},
|
||||
"System.Text.Encoding.CodePages/6.0.0": {
|
||||
"dependencies": {
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
}
|
||||
},
|
||||
"System.Threading.Channels/6.0.0": {}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
@ -18,6 +548,272 @@
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Humanizer.Core/2.14.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw==",
|
||||
"path": "humanizer.core/2.14.1",
|
||||
"hashPath": "humanizer.core.2.14.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Bcl.AsyncInterfaces/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==",
|
||||
"path": "microsoft.bcl.asyncinterfaces/6.0.0",
|
||||
"hashPath": "microsoft.bcl.asyncinterfaces.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Analyzers/3.3.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ==",
|
||||
"path": "microsoft.codeanalysis.analyzers/3.3.3",
|
||||
"hashPath": "microsoft.codeanalysis.analyzers.3.3.3.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Common/4.5.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-lwAbIZNdnY0SUNoDmZHkVUwLO8UyNnyyh1t/4XsbFxi4Ounb3xszIYZaWhyj5ZjyfcwqwmtMbE7fUTVCqQEIdQ==",
|
||||
"path": "microsoft.codeanalysis.common/4.5.0",
|
||||
"hashPath": "microsoft.codeanalysis.common.4.5.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.CSharp/4.5.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-cM59oMKAOxvdv76bdmaKPy5hfj+oR+zxikWoueEB7CwTko7mt9sVKZI8Qxlov0C/LuKEG+WQwifepqL3vuTiBQ==",
|
||||
"path": "microsoft.codeanalysis.csharp/4.5.0",
|
||||
"hashPath": "microsoft.codeanalysis.csharp.4.5.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.CSharp.Workspaces/4.5.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-h74wTpmGOp4yS4hj+EvNzEiPgg/KVs2wmSfTZ81upJZOtPkJsVkgfsgtxxqmAeapjT/vLKfmYV0bS8n5MNVP+g==",
|
||||
"path": "microsoft.codeanalysis.csharp.workspaces/4.5.0",
|
||||
"hashPath": "microsoft.codeanalysis.csharp.workspaces.4.5.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Workspaces.Common/4.5.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-l4dDRmGELXG72XZaonnOeORyD/T5RpEu5LGHOUIhnv+MmUWDY/m1kWXGwtcgQ5CJ5ynkFiRnIYzTKXYjUs7rbw==",
|
||||
"path": "microsoft.codeanalysis.workspaces.common/4.5.0",
|
||||
"hashPath": "microsoft.codeanalysis.workspaces.common.4.5.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore/8.0.10": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-PPkQdIqfR1nU3n6YgGGDk8G+eaYbaAKM1AzIQtlPNTKf10Osg3N9T+iK9AlnSA/ujsK00flPpFHVfJrbuBFS1A==",
|
||||
"path": "microsoft.entityframeworkcore/8.0.10",
|
||||
"hashPath": "microsoft.entityframeworkcore.8.0.10.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Abstractions/8.0.10": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-FV0QlcX9INY4kAD2o72uPtyOh0nZut2jB11Jf9mNYBtHay8gDLe+x4AbXFwuQg+eSvofjT7naV82e827zGfyMg==",
|
||||
"path": "microsoft.entityframeworkcore.abstractions/8.0.10",
|
||||
"hashPath": "microsoft.entityframeworkcore.abstractions.8.0.10.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Analyzers/8.0.10": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-51KkPIc0EMv/gVXhPIUi6cwJE9Mvh+PLr4Lap4naLcsoGZ0lF2SvOPgUUprwRV3MnN7nyD1XPhT5RJ/p+xFAXw==",
|
||||
"path": "microsoft.entityframeworkcore.analyzers/8.0.10",
|
||||
"hashPath": "microsoft.entityframeworkcore.analyzers.8.0.10.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Design/8.0.10": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-uGNjfKvAsql2KHRqxlK5wHo8mMC60G/FecrFKEjJgeIxtUAbSXGOgKGw/gD9flO5Fzzt1C7uxfIcr6ZsMmFkeg==",
|
||||
"path": "microsoft.entityframeworkcore.design/8.0.10",
|
||||
"hashPath": "microsoft.entityframeworkcore.design.8.0.10.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.EntityFrameworkCore.Relational/8.0.10": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-OefBEE47kGKPRPV3OT+FAW6o5BFgLk2D9EoeWVy7NbOepzUneayLQxbVE098FfedTyMwxvZQoDD9LrvZc3MadA==",
|
||||
"path": "microsoft.entityframeworkcore.relational/8.0.10",
|
||||
"hashPath": "microsoft.entityframeworkcore.relational.8.0.10.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Caching.Abstractions/8.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-3KuSxeHoNYdxVYfg2IRZCThcrlJ1XJqIXkAWikCsbm5C/bCjv7G0WoKDyuR98Q+T607QT2Zl5GsbGRkENcV2yQ==",
|
||||
"path": "microsoft.extensions.caching.abstractions/8.0.0",
|
||||
"hashPath": "microsoft.extensions.caching.abstractions.8.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Caching.Memory/8.0.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-HFDnhYLccngrzyGgHkjEDU5FMLn4MpOsr5ElgsBMC4yx6lJh4jeWO7fHS8+TXPq+dgxCmUa/Trl8svObmwW4QA==",
|
||||
"path": "microsoft.extensions.caching.memory/8.0.1",
|
||||
"hashPath": "microsoft.extensions.caching.memory.8.0.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Configuration.Abstractions/8.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==",
|
||||
"path": "microsoft.extensions.configuration.abstractions/8.0.0",
|
||||
"hashPath": "microsoft.extensions.configuration.abstractions.8.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.DependencyInjection/8.0.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==",
|
||||
"path": "microsoft.extensions.dependencyinjection/8.0.1",
|
||||
"hashPath": "microsoft.extensions.dependencyinjection.8.0.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions/8.0.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==",
|
||||
"path": "microsoft.extensions.dependencyinjection.abstractions/8.0.2",
|
||||
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.8.0.2.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.DependencyModel/8.0.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-mUBDZZRgZrSyFOsJ2qJJ9fXfqd/kXJwf3AiDoqLD9m6TjY5OO/vLNOb9fb4juC0487eq4hcGN/M2Rh/CKS7QYw==",
|
||||
"path": "microsoft.extensions.dependencymodel/8.0.2",
|
||||
"hashPath": "microsoft.extensions.dependencymodel.8.0.2.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Logging/8.0.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==",
|
||||
"path": "microsoft.extensions.logging/8.0.1",
|
||||
"hashPath": "microsoft.extensions.logging.8.0.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Logging.Abstractions/8.0.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==",
|
||||
"path": "microsoft.extensions.logging.abstractions/8.0.2",
|
||||
"hashPath": "microsoft.extensions.logging.abstractions.8.0.2.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Options/8.0.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==",
|
||||
"path": "microsoft.extensions.options/8.0.2",
|
||||
"hashPath": "microsoft.extensions.options.8.0.2.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Extensions.Primitives/8.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==",
|
||||
"path": "microsoft.extensions.primitives/8.0.0",
|
||||
"hashPath": "microsoft.extensions.primitives.8.0.0.nupkg.sha512"
|
||||
},
|
||||
"Mono.TextTemplating/2.2.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-KZYeKBET/2Z0gY1WlTAK7+RHTl7GSbtvTLDXEZZojUdAPqpQNDL6tHv7VUpqfX5VEOh+uRGKaZXkuD253nEOBQ==",
|
||||
"path": "mono.texttemplating/2.2.1",
|
||||
"hashPath": "mono.texttemplating.2.2.1.nupkg.sha512"
|
||||
},
|
||||
"Npgsql/8.0.5": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-zRG5V8cyeZLpzJlKzFKjEwkRMYIYnHWJvEor2lWXeccS2E1G2nIWYYhnukB51iz5XsWSVEtqg3AxTWM0QJ6vfg==",
|
||||
"path": "npgsql/8.0.5",
|
||||
"hashPath": "npgsql.8.0.5.nupkg.sha512"
|
||||
},
|
||||
"Npgsql.EntityFrameworkCore.PostgreSQL/8.0.10": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-gFPl9Dmxih7Yi4tZ3bITzZFzbxFMBx04gqTqcjoL2r5VEW+O2TA5UVw/wm/XW26NAJ7sg59Je0+9QrwiZt6MPQ==",
|
||||
"path": "npgsql.entityframeworkcore.postgresql/8.0.10",
|
||||
"hashPath": "npgsql.entityframeworkcore.postgresql.8.0.10.nupkg.sha512"
|
||||
},
|
||||
"System.CodeDom/4.4.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-2sCCb7doXEwtYAbqzbF/8UAeDRMNmPaQbU2q50Psg1J9KzumyVVCgKQY8s53WIPTufNT0DpSe9QRvVjOzfDWBA==",
|
||||
"path": "system.codedom/4.4.0",
|
||||
"hashPath": "system.codedom.4.4.0.nupkg.sha512"
|
||||
},
|
||||
"System.Collections.Immutable/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
|
||||
"path": "system.collections.immutable/6.0.0",
|
||||
"hashPath": "system.collections.immutable.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Composition/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-d7wMuKQtfsxUa7S13tITC8n1cQzewuhD5iDjZtK2prwFfKVzdYtgrTHgjaV03Zq7feGQ5gkP85tJJntXwInsJA==",
|
||||
"path": "system.composition/6.0.0",
|
||||
"hashPath": "system.composition.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Composition.AttributedModel/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-WK1nSDLByK/4VoC7fkNiFuTVEiperuCN/Hyn+VN30R+W2ijO1d0Z2Qm0ScEl9xkSn1G2MyapJi8xpf4R8WRa/w==",
|
||||
"path": "system.composition.attributedmodel/6.0.0",
|
||||
"hashPath": "system.composition.attributedmodel.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Composition.Convention/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XYi4lPRdu5bM4JVJ3/UIHAiG6V6lWWUlkhB9ab4IOq0FrRsp0F4wTyV4Dj+Ds+efoXJ3qbLqlvaUozDO7OLeXA==",
|
||||
"path": "system.composition.convention/6.0.0",
|
||||
"hashPath": "system.composition.convention.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Composition.Hosting/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-w/wXjj7kvxuHPLdzZ0PAUt++qJl03t7lENmb2Oev0n3zbxyNULbWBlnd5J5WUMMv15kg5o+/TCZFb6lSwfaUUQ==",
|
||||
"path": "system.composition.hosting/6.0.0",
|
||||
"hashPath": "system.composition.hosting.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Composition.Runtime/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-qkRH/YBaMPTnzxrS5RDk1juvqed4A6HOD/CwRcDGyPpYps1J27waBddiiq1y93jk2ZZ9wuA/kynM+NO0kb3PKg==",
|
||||
"path": "system.composition.runtime/6.0.0",
|
||||
"hashPath": "system.composition.runtime.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Composition.TypedParts/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-iUR1eHrL8Cwd82neQCJ00MpwNIBs4NZgXzrPqx8NJf/k4+mwBO0XCRmHYJT4OLSwDDqh5nBLJWkz5cROnrGhRA==",
|
||||
"path": "system.composition.typedparts/6.0.0",
|
||||
"hashPath": "system.composition.typedparts.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.IO.Pipelines/6.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-ryTgF+iFkpGZY1vRQhfCzX0xTdlV3pyaTTqRu2ETbEv+HlV7O6y7hyQURnghNIXvctl5DuZ//Dpks6HdL/Txgw==",
|
||||
"path": "system.io.pipelines/6.0.3",
|
||||
"hashPath": "system.io.pipelines.6.0.3.nupkg.sha512"
|
||||
},
|
||||
"System.Reflection.Metadata/6.0.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-III/lNMSn0ZRBuM9m5Cgbiho5j81u0FAEagFX5ta2DKbljZ3T0IpD8j+BIiHQPeKqJppWS9bGEp6JnKnWKze0g==",
|
||||
"path": "system.reflection.metadata/6.0.1",
|
||||
"hashPath": "system.reflection.metadata.6.0.1.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
|
||||
"path": "system.runtime.compilerservices.unsafe/6.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Text.Encoding.CodePages/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-ZFCILZuOvtKPauZ/j/swhvw68ZRi9ATCfvGbk1QfydmcXBkIWecWKn/250UH7rahZ5OoDBaiAudJtPvLwzw85A==",
|
||||
"path": "system.text.encoding.codepages/6.0.0",
|
||||
"hashPath": "system.text.encoding.codepages.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Threading.Channels/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==",
|
||||
"path": "system.threading.channels/6.0.0",
|
||||
"hashPath": "system.threading.channels.6.0.0.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,6 +6,7 @@
|
||||
"version": "8.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.NullabilityInfoContext.IsSupported": true,
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
|
BIN
Demo/bin/Debug/net8.0/Humanizer.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Humanizer.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.CSharp.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.CSharp.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.Workspaces.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.Workspaces.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Design.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Design.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Caching.Memory.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Caching.Memory.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.DependencyModel.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.DependencyModel.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Primitives.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Primitives.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Mono.TextTemplating.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Mono.TextTemplating.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Npgsql.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Npgsql.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.CodeDom.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.CodeDom.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.AttributedModel.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.AttributedModel.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.Convention.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.Convention.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.Hosting.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.Hosting.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.Runtime.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.Runtime.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.TypedParts.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.TypedParts.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.IO.Pipelines.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.IO.Pipelines.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/cs/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/cs/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/de/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/de/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/es/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/es/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/fr/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/fr/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/it/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/it/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/ja/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/ja/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user