摘要:主要用于网站以.Net Core 3.1 Web MVC网站,其中有部分数据需要建立API通过外部Winform程序使用。 主要代码 Startup中的ConfigureServices: //增加网页登录方式,直接使用自带的Identity services.AddIdentity<Applica
阅读全文
摘要:Controllers中的代码 //获取指定分类的所有项目 [HttpGet(Name= nameof(GetDictionarys))] public async Task<ActionResult<DictionarysItemViewModel>> GetDictionarys(string
阅读全文
摘要:C#生成树形结构泛型类,使用方法: ToTree<ShowMessageUpdatesTableTreeViewModel>.ToDo(models) 实体类必须实现接口: 实体类实例:
阅读全文
摘要:这种功能为什么不向MessageBox一样自带,还得自己写~~
阅读全文
摘要:主要代码如下:StringFormat fmt = new StringFormat();fmt.LineAlignment = StringAlignment.Near;//左对齐fmt.FormatFlags = StringFormatFlags.LineLimit;//自动换行//设定文本打...
阅读全文
摘要:1、修改AccountViewModels·修改RegisterViewModelpublic class RegisterViewModel{ [Required] [Display(Name = "用户名")] public string UserName { get; set...
阅读全文
摘要:看代码基本就都能看懂了,增加了两个用户详细信息的表,角色表增加两个字段页面中实现树形显示。//IdentityModels.csusing System.Data.Entity;using System.Security.Claims;using System.Threading.Tasks;usi...
阅读全文