PI06 i PI06-1. Docker definitions for MSSQL and Postgres. Data seeder/generator for countries and people. Entity Framework example with variants for Postgres and MSSQL
This commit is contained in:
18
DataAccess/EF_Demo/ExceptionExtensions.cs
Normal file
18
DataAccess/EF_Demo/ExceptionExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Text;
|
||||
|
||||
namespace EF_Demo;
|
||||
|
||||
public static class ExceptionExtensions
|
||||
{
|
||||
public static string CompleteExceptionMessage(this Exception exc)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(exc.Message);
|
||||
while (exc.InnerException != null)
|
||||
{
|
||||
exc = exc.InnerException;
|
||||
sb.AppendLine();
|
||||
sb.Append(exc.Message);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user