写在model里,实体类里。

public string FirstName
{
get
{
return string.IsNullOrEmpty(this.Name) ? "" : Net.Sourceforge.Pinyin4j.PinyinHelper.ToHanyuPinyinString(this.Name, new Net.Sourceforge.Pinyin4j.Format.HanyuPinyinOutputFormat(), " ").ToCharArray()[0].ToString().ToUpper();
}
}

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2021-12-15
猜你喜欢
  • 2021-12-15
  • 2022-12-23
  • 2021-10-05
  • 2021-12-15
  • 2021-10-15
  • 2022-12-23
相关资源
相似解决方案