I'm using SerlLog with SQL Server and after configuration I have the following table in SQL Server:
I want to add data to the columns Message LikeExpression and other columns for occurrence.
I tried the following code
Log.ForContext("Message", "Some Message")
.ForContext("LikeExpression", ex.Message)
.Fatal("{StackTrace}", ex.Message, ex.StackTrace);
and this adds the following data to the table
I must have the Some Message string in Message column but it does not work any help please?


Finally I found the answer: I just reomoved the column Message from the table as it consider a stundered column by using xml configuration like this
then add it again as an ordinary column in c# using
then to add data log to this table using serilog I used the following