I have been scratching my head all day on how to make Umbraco create a custom table from model on Application start.
I got all the functions working but I cant seem to make it create a Nvarchar(Max) column.
This is my Model column :
[Column("values")]
[NullSetting]
[MaxLength]
public string values { get; set; }
I know the MaxLength is more of an EF attribute and should not work, I found in the Umbraco core all the data attributes available and the only attribute that could change the length of the string is [Length(4000)] but I cant do [Length] to get Max.
Code first create Nvarchar(Max)
Hi all,
I have been scratching my head all day on how to make Umbraco create a custom table from model on Application start.
I got all the functions working but I cant seem to make it create a Nvarchar(Max) column.
This is my Model column :
[Column("values")]
[NullSetting]
[MaxLength]
public string values { get; set; }
I know the MaxLength is more of an EF attribute and should not work, I found in the Umbraco core all the data attributes available and the only attribute that could change the length of the string is [Length(4000)] but I cant do [Length] to get Max.
Any ideas how this is done ?
Link to all the attributes:
https://github.com/umbraco/Umbraco-CMS/tree/7.1.0/src/Umbraco.Core/Persistence/DatabaseAnnotations
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.