Search for existing suggestions

Code First better attributes

* Decimal Scale/Precision
[Column(DecimalScale=18, DecimalPrecision=2)]

* Nullable indication (For string is essential):
[Column(NotNull = true)]

* All in one:
[Column("TestName", NotNull = false, MaxLength = 250, MinLength = 3, Default = ""])
public String Name { get; set; }

[Column(NotNull = true, MaxLength = 0, Default = 0])
public int Count { get; set; }

7 votes
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)

We’ll send you updates on this idea

Salar shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Dio commented  ·   ·  Flag as inappropriate

    NotNull is already implemented - [Required]
    For String (varchar) columns you can also decline using of empty strings: [Required(AllowEmptyStrings = false)]

Feedback and Knowledge Base