I am working with the code first approach, here is the POCO object I am using
public class Fotografia
{
// Fotografía
[Display(Name = "Fotografía")]
public required byte[] fotografia { get; set; }
}
I want to set the max value for the varbinary value it creates, currently I've read other posts which specify that this way it should set by default the max value but my code generates
fotografia (PK, varbinary(900), not null)
Which is smaller than what I need to use
1条答案
按热度按时间xqnpmsa81#
Simply adding the [MaxLength] annotation doesn't work? Like this?