在EF中有些添加的字段 文本显示超多文字,想截取显示又没有截取功能。

怎么办?

  我们可以在EF中类的属性中设置

你想限制这个用户名只能有10个字符长度
public String UserName
{
        get{return username;}
        set{if(value.Length<=10){username=value;}}
}

相关文章:

  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2021-11-26
  • 2021-05-30
  • 2022-12-23
猜你喜欢
  • 2021-07-11
  • 2022-12-23
  • 2021-04-06
  • 2022-02-21
  • 2022-03-04
  • 2021-08-15
  • 2021-08-02
相关资源
相似解决方案