Skip to content

Лаб. 3 6412 Яковлев Радик#284

Open
Ryedis wants to merge 10 commits intoitsecd:mainfrom
Ryedis:lab_3
Open

Лаб. 3 6412 Яковлев Радик#284
Ryedis wants to merge 10 commits intoitsecd:mainfrom
Ryedis:lab_3

Conversation

@Ryedis
Copy link

@Ryedis Ryedis commented Feb 22, 2026

ФИО: Яковлев Радик
Номер группы: 6412
Номер лабораторной: 2, 3
Номер варианта: 55
Краткое описание предметной области: Библиотека
Краткое описание добавленных фич: Реализован слой доступа к данным через EF Core, добавлены репозитории для всех сущностей, разработан сервисный слой с валидацией бизнес-логики, DTO и AutoMapper, а также добавлен REST API контроллеров, обеспечивающих полный набор CRUD-операций и специальный аналитический контроллер.

@github-actions github-actions bot added In progress Код в процессе проверки Lab 3 Лабораторная №3. ORM labels Feb 22, 2026
@github-actions github-actions bot requested a review from alxmcs February 22, 2026 19:55
@alxmcs alxmcs added the Lab 2 Лабораторная №2. Сервер label Feb 23, 2026
Copy link
Contributor

@alxmcs alxmcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

На пересдачу можешь не приходить, встретимся на комиссии

name: Run .NET Tests

on:
push:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Настолько часто запускать ашон нет смысла

}
catch (Exception ex)
{
logger.LogError("An exception happened during {method} method of {controller}: {@exception}", nameof(GetIssuedBooksOrderedByTitle), GetType().Name, ex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь и далее по коду - у LogError есть перегрузка, которая принимает Exception в качестве первого параметра

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет настройки cors

/// <summary>
/// Дата регистрации читателя
/// </summary>
public DateTime? RegistrationDate { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В #280 тут был другой тип данных

Comment on lines +10 to +14
/// <summary>
/// Фиксированная точка времени для детерминированных данных
/// </summary>
public static readonly DateTime SeedNowUtc =
DateTime.SpecifyKind(new DateTime(2026, 2, 19, 0, 0, 0), DateTimeKind.Utc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему-то относительно #280 изменилась и эта строка, хотя ничего полезного в ней привнесено не было . То, что тут сейчас написано - бестолковое синтаксическое дрочилово, полностью эквивалентное new(2026, 2, 19)

Comment on lines +25 to +52
public async Task<Reader?> Read(int entityId)
{
return await db.Readers
.Include(r => r.BookIssues)
.ThenInclude(i => i.Book)
.ThenInclude(b => b!.Publisher)
.Include(r => r.BookIssues)
.ThenInclude(i => i.Book)
.ThenInclude(b => b!.EditionType)
.FirstOrDefaultAsync(r => r.Id == entityId);
}

/// <summary>
/// Возвращает список всех читателей
/// </summary>
public async Task<IList<Reader>> ReadAll()
{
return await db.Readers
.AsNoTracking()
.Include(r => r.BookIssues)
.ThenInclude(i => i.Book)
.ThenInclude(b => b!.Publisher)
.Include(r => r.BookIssues)
.ThenInclude(i => i.Book)
.ThenInclude(b => b!.EditionType)
.OrderBy(x => x.Id)
.ToListAsync();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Интересно, что смотивировало тебя не использовать AsNoTracking() в первом случае, но использовать во втором?

Comment on lines +9 to +11
/// <summary>
/// Контроллер для работы с книгами
/// </summary>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь и далее по коду - в саммари служб отсутствует описание параметров

Comment on lines +19 to +25
<ItemGroup>
<ProjectReference Include="..\Library.Domain\Library.Domain.csproj" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Очень интересно - порядок директив изменился относительно #280

/// <summary>
/// Набор unit тестов для тестирования доменной области
/// </summary>
public class LibraryTests(DataSeeder dataSeeder) : IClassFixture<DataSeeder>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Радует, что появилось использование IClassFixture, о котором я забыл упомянуть в ревью 1 лабораторной

Comment on lines +3 to +6
# Visual Studio Version 17
VisualStudioVersion = 17.14.36705.20
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library.Domain", "Library.Domain\Library.Domain.csproj", "{179BC2B9-1601-4FD6-9331-690CA8B4BAF1}"
Copy link
Contributor

@alxmcs alxmcs Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Также, меня очень интересует то, что с момента открытия #280 изменилась версия студии, а также гуиды всех ранее существовавших проектов - как будто все решение было пересобрано на другой машине.

Почему я не верю в то, что ты просто обновил версию студии после первого pr? Потому что версия 17.14.36705.20 релизнулась 11 ноября 2025 года, а актуальная версия - 17.14.37012.4

А вот нашелся и источник - #197 - этот pr содержит полную копию кода, вплоть до билд версии вижуал студии и гуидов проектов

@alxmcs alxmcs added the Stolen Вы уличены в краже кода. Вы покрыли себя несмываемым позором и получаете 0 баллов за код. label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In progress Код в процессе проверки Lab 2 Лабораторная №2. Сервер Lab 3 Лабораторная №3. ORM Stolen Вы уличены в краже кода. Вы покрыли себя несмываемым позором и получаете 0 баллов за код.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants