上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 47 下一页
摘要: 上传文件需要multipart/form-data 同时参数也需要使用[FromForm]修饰 [HttpPost] [Consumes("application/json", "multipart/form-data")] [DisableRequestSizeLimit] [AllowAnony 阅读全文
posted @ 2022-01-13 18:01 Hey,Coder! 阅读(349) 评论(0) 推荐(0)
摘要: 实现效果:Vs创建项目,选择模板后自动生成项目结构,如下图 准备好脚手架需要的源码 在项目根目录创建目录【.template.config】注意不要漏掉前缀. 在.template.config目录中创建文件【template.json】 内容如下 { "$schema": "http://json 阅读全文
posted @ 2022-01-12 10:16 Hey,Coder! 阅读(472) 评论(0) 推荐(0)
摘要: 1.外部传入 public partial class App : Application { ServiceProvider serviceProvider { get; set; } protected override void OnStartup(StartupEventArgs e) { 阅读全文
posted @ 2022-01-11 10:44 Hey,Coder! 阅读(426) 评论(0) 推荐(0)
摘要: 引入Oracle.EntityFrameworkCore 添加Model [Table("T_SYS_USER")] public class User { [Key] public string USER_ID { get; set; } } 添加上下文 public class SchemeCo 阅读全文
posted @ 2022-01-10 15:07 Hey,Coder! 阅读(325) 评论(0) 推荐(0)
摘要: 将App.xaml中的StartupUri删去 调整App.xaml.cs,重写OnStartup方法 public partial class App : Application { ServiceProvider serviceProvider { get; set; } protected o 阅读全文
posted @ 2022-01-10 13:14 Hey,Coder! 阅读(1027) 评论(0) 推荐(0)
摘要: 使用T4模板自动生成需要的数据库实体类、仓储类、仓储接口 代码 提供的项目 AutoInfrastructGenerate - 提供基础生成实体(实体基础结构-不读取数据库-可手动扩展读取特定数据库实体类型)、仓储 -T4模板 GenEntities-Mysql - 读取mysql中的表自动生成实体 阅读全文
posted @ 2021-12-30 16:30 Hey,Coder! 阅读(163) 评论(0) 推荐(0)
摘要: public static class ExpressionHelper { #region 与或非封装 public static Expression<Func<T, bool>> True<T>() { return param => true; } public static Express 阅读全文
posted @ 2021-12-24 15:20 Hey,Coder! 阅读(215) 评论(0) 推荐(0)
摘要: 获取表达式调用的字段名称 /// <summary> /// 获取表达式调用的字段名称 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="expr"></param> /// <returns></returns 阅读全文
posted @ 2021-12-24 15:15 Hey,Coder! 阅读(138) 评论(0) 推荐(0)
摘要: BaGet 搭建过程 官方包 v0.4.0-preview2 修改配置 运行 dotnet BaGet.dll 运行效果如下 上传 dotnet nuget push -s http://localhost/v3/index.json package.nupkg 如果设置了秘钥以后可通过setapi 阅读全文
posted @ 2021-12-17 15:47 Hey,Coder! 阅读(133) 评论(0) 推荐(0)
摘要: public static class ExpressionEx { public static Expression<Func<T, bool>> True<T>() { return param => true; } public static Expression<Func<T, bool>> 阅读全文
posted @ 2021-12-16 15:12 Hey,Coder! 阅读(123) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 47 下一页