上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 68 下一页
摘要: 本地临时表的名称以单个数字字符(#)开头,它们仅对当前的用户连接是可见的。 全局临时表的名称以两个数字字符(##)开头,创建后对任何用户都是可见的。 阅读全文
posted @ 2019-05-05 11:10 SpringCore 阅读(1104) 评论(0) 推荐(0)
摘要: 使用@@IDENTITY 例如:insert into student(name,age) values('fanqi',23) select @@identity 使用 OUTPUT inserted 例如:INSERT INTO UserInfo(Username,LogName,[Passwo 阅读全文
posted @ 2019-05-05 11:08 SpringCore 阅读(2241) 评论(1) 推荐(2)
摘要: Type类的使用(类反射)通过类获得Type: Type t = typeof(Person)通过实例对象获得类的Type: Type t = p.GetType()获取Type的方法:MethodInfo method = type.GetMethod("MethodName",new Type[ 阅读全文
posted @ 2019-05-05 11:05 SpringCore 阅读(490) 评论(0) 推荐(0)
摘要: ⒈Skip(int count) 说明:跳过集合的前n个元素;延迟。即我们跳过给定的数目返回后面的结果集。 ⒉Take(int count) 说明:获取集合的前n个元素;延迟。即只返回限定数量的结果集。 案例:分页查询 ⒊OrderBy 说明:按指定表达式对集合排序;延迟,默认是升序,加上desce 阅读全文
posted @ 2019-05-05 10:13 SpringCore 阅读(463) 评论(0) 推荐(0)
摘要: ⒈创建数据库,在数据中执行以下脚本。 ⒉添加依赖 MySql.Data.EntityFrameworkCore ⒊实施反向工程,基于现有数据库创建数据表实体类及上下文。 第一种方式:"Visual Studio 2019" >“工具”>“NuGet 包管理器”>“程序包管理器控制台”,执行以下命令( 阅读全文
posted @ 2019-05-04 21:32 SpringCore 阅读(1604) 评论(0) 推荐(0)
摘要: ⒈添加依赖 MySql.Data.EntityFrameworkCore ⒉在appsettings.json配置文件中配置数据库连接字符串 ⒊编写数据表实体类及上下文 ⒋使用依赖注入将上下文注册为服务 ⒌使用迁移创建数据库 第一种方式:"Visual Studio 2019" >“工具”>“NuG 阅读全文
posted @ 2019-05-04 19:29 SpringCore 阅读(1009) 评论(0) 推荐(1)
摘要: ⒈添加Json配置文件并将“复制到输出目录”属性设置为“始终复制” ⒉在Program中加载配置文件 ⒊使用配置文件中的相关属性 阅读全文
posted @ 2019-05-03 22:15 SpringCore 阅读(320) 评论(0) 推荐(0)
摘要: ⒈添加依赖 Microsoft.Extensions.Configuration Microsoft.Extensions.Configuration.FileExtensions Microsoft.Extensions.Configuration.Json ⒉在项目中添加Json配置文件并将其复 阅读全文
posted @ 2019-05-03 21:55 SpringCore 阅读(2748) 评论(0) 推荐(1)
摘要: ⒈安装相关依赖 NLog NLog.Web.AspNetCore ⒉在项目的根目录中创建NLog配置文件 ⒊更改配置文件属性 ⒋修改Program.cs ⒌配置appsettings.json ⒍在代码中注入ILogger写日志 阅读全文
posted @ 2019-05-01 22:24 SpringCore 阅读(1400) 评论(0) 推荐(0)
摘要: 官网:http://automapper.org/ 文档:https://automapper.readthedocs.io/en/latest/index.html GitHub:https://github.com/AutoMapper/AutoMapper/blob/master/docs/i 阅读全文
posted @ 2019-05-01 21:16 SpringCore 阅读(1062) 评论(0) 推荐(0)
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 68 下一页