`
public void DataBaze() { using (Test_Baza_ASP_Entities baza = new Test_Baza_ASP_Entities()) { Test_Table dataContact = new Test_Table() { Index_name = name, }; baza.Test_Tables.Add(dataContact); baza.SaveChanges(); } }` ASP.NET and just C # users and database specialists) Help me find the problem. I perform a simple learning task in ASP.NET. The goal is to read data from textboxes and write to the database using DetailsView. Everything is simple, especially when Entity has already passed and there is an application and a working base (Avrbaza) with a table where I am recording data using the method of creating an EF model.
At first, I decided to simply code in the old fashion through the creation of a model without DetailsView to write data. For my task I create a new database (test_asp_baza) as I created the old one, I create the table as I created the old one. I create connection as well. The code is clear, simple and beautiful as in my working application. The result is an error on the moment. SaveChanges ()
We go further. I do according to the DetailsView method and right in the constructor I create a connection where I have the necessary items in the table (INSERT, UPDATE DELETE) I cannot select
Further more interesting. I take the old working base through “I don’t want” (it’s working and I don’t want to touch it) and create a table there. The result is the same - does not want to record and give access.
And then the most important thing. I decided to take a chance and write test data to the work table from the work base (Avrbaza). And then everything works on both methods. DetailsView the necessary items, you can select the EF, too, through the model without any problems writes down.
Question: How did I create that table so that I can change everything there, but not in a new one, even if it is created in a working database? Checked all the properties of the table - everything is identical. DBMS Microsoft SQL Server. Base I create in SQL Server 2014 Management Studio


