Skip to content

Comments

6 homework#8

Open
Niksen111 wants to merge 4 commits intomainfrom
6Homework
Open

6 homework#8
Niksen111 wants to merge 4 commits intomainfrom
6Homework

Conversation

@Niksen111
Copy link
Owner

No description provided.

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

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

Почти ничего не сделано и вообще ничего не работает, но запускается хоть :)


using System.ComponentModel.DataAnnotations.Schema;

public class Assembly

Choose a reason for hiding this comment

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

Комментариев глобально не хватает.

public int AssemblyId { get; set; }

[Column("name")]
public string Name { get; set; }

Choose a reason for hiding this comment

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

Nullability-анализ недоволен происходящим, тут и ниже. Если эти данные могут приходить извне, возможно, стоило поля явно nullable сделать.

Comment on lines +24 to +25
// Add new record to db
//

Choose a reason for hiding this comment

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

Хм.


public List<Data.Assembly> GetAssemblies(int assemblyCount = -1)
{
using var context = new TestingDataDbContext(new DbContextOptions<TestingDataDbContext>());

Choose a reason for hiding this comment

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

Тут должно было бы быть получение сконфигурированного контекста из контейнера, а не создание нового с пустой конфигурацией. Падает так, при попытке перейти на вкладку History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants