I get an error

System.Data.SqlClient.SqlException: "Could not allocate space for object 'dbo.Lines'.'PK_dbo.Lines' in database 'C:\USERS\DEZMONT\BIN\DEBUG\APPDATA\STRINGSDB.MDF' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup." 

As I understood it here explains how to fix: https://stackoverflow.com/questions/34003578/entity-framework-set-autogrowth-and-maxsize

But I am too weak in SQL and I cannot understand exactly which script I need to execute in the UP method. Please write an example of the script that you want to put in Sql ().

    1 answer 1

    Something like this, assuming that the Primary group in STRINGSDB consists of only one file with the logical name STRINGSDB:

     ALTER DATABASE [STRINGSDB] MODIFY FILE ( NAME = 'STRINGSDB', FILEGROWTH = 10%, MAXSIZE = UNLIMITED ) 
    • And where and how can I see the names of the database and file? I mean "[STRINGSDB] and NAME = 'STRINGSDB'" - Alexander Li
    • In SQL Object Browser in Storage? - Alexander Lee
    • @AlexanderLee than you work with the base? Management Studio? Or tools to work with the database in Visual Studio? - MSDN.WhiteKnight
    • Probably with VS tools. Well, the name seems to have gone. Now another problem. The value can not be undefined. Parameter name: connection But for this, I will probably ask a new question. - Alexander Lee