'The Add method does not insert a new record into the database

The Add method does not insert a new record into the database.

Working with the database through the application.
The SelectAll request is executed.
The Insert request is not executed. There are no errors.

The Insert request code. Not running(Not working)

public void Insert(Source source)
{
using (var DbContext = new DbContextSQlite())
{
        dbContext.Sources.Add(source);
        dbContext.SaveChanges();
   }
}

The selectAll request code.

Public void selectAll() is running
{
using (var DbContext = new DbContextSQlite())
{
        var rows = from x in dbContext.Sources
                   select x;
        int count = rows.Count();
    }
}

Working with the database via DB Browser using SQL queries
The Select query is executed.
The Insert request is being executed.

Used.

  • DB Browser for SQLite Version 3.12.2;
  • Visual Studio Community 2019. 16.11.10;
  • Application-Console. .NET Framework 4.7.2;

Picture-1
Picture-2


Update-1

Update-1. When I try to fully post a question, stackoverflow.com gives me comments on the design. I don't understand how to eliminate these comments. That's why I'm posting the question in an online editor.

Follow the link -> Detailed question.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source