forked from ddrilling/AsbCloudServer
Added try/catch for 'Demo data' project for error cases
This commit is contained in:
parent
42b9849ae9
commit
9d80c28c1b
@ -18,6 +18,8 @@ namespace AsbCloudDbDemoData
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var options = new DbContextOptionsBuilder<AsbCloudDbContext>()
|
||||
.UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True")
|
||||
.Options;
|
||||
@ -297,5 +299,10 @@ namespace AsbCloudDbDemoData
|
||||
else
|
||||
Console.WriteLine("Ошибка при добавлении данных");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user