public class AuditLog
{
public int Id { get; set; }
[MaxLength(65536)]
public IDictionary<string, object> AuditData { get; set; }
}
Is it possible with EF Core 7 support for JSON columns to make this AuditData property to be JSON column? I am using SQL Server.
1条答案
按热度按时间fnvucqvd1#
Yes it's possible but you have to configure it in the context not using the annotations.
You will need to add the package
Microsoft.EntityFrameworkCore.SqlServer.Json
then use theHasJsonConversion
method in yourDbContext