会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
0x0c,0x0d
Write The CODE,Change The World!
首页
新随笔
联系
管理
上一页
1
···
20
21
22
23
24
25
26
27
28
···
47
下一页
2022年1月13日
.net5 webapi 上传文件同时提交参数
摘要: 上传文件需要multipart/form-data 同时参数也需要使用[FromForm]修饰 [HttpPost] [Consumes("application/json", "multipart/form-data")] [DisableRequestSizeLimit] [AllowAnony
阅读全文
posted @ 2022-01-13 18:01 Hey,Coder!
阅读(349)
评论(0)
推荐(0)
2022年1月12日
VS 项目模板 自动创建项目结构 源码脚手架
摘要: 实现效果:Vs创建项目,选择模板后自动生成项目结构,如下图 准备好脚手架需要的源码 在项目根目录创建目录【.template.config】注意不要漏掉前缀. 在.template.config目录中创建文件【template.json】 内容如下 { "$schema": "http://json
阅读全文
posted @ 2022-01-12 10:16 Hey,Coder!
阅读(472)
评论(0)
推荐(0)
2022年1月11日
wpf中 efcore 两种配置方式
摘要: 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)
2022年1月10日
efcore oracle
摘要: 引入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)
WPF中实现依赖注入
摘要: 将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)
2021年12月30日
自动生成仓储结构、实体结构 T4模板
摘要: 使用T4模板自动生成需要的数据库实体类、仓储类、仓储接口 代码 提供的项目 AutoInfrastructGenerate - 提供基础生成实体(实体基础结构-不读取数据库-可手动扩展读取特定数据库实体类型)、仓储 -T4模板 GenEntities-Mysql - 读取mysql中的表自动生成实体
阅读全文
posted @ 2021-12-30 16:30 Hey,Coder!
阅读(163)
评论(0)
推荐(0)
2021年12月24日
c#表达式扩展与或非 通过表达式获取字段属性名称
摘要: 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)
c#通过表达式获取调用的属性名称 & 动态获取列表中特定字段的数据
摘要: 获取表达式调用的字段名称 /// <summary> /// 获取表达式调用的字段名称 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="expr"></param> /// <returns></returns
阅读全文
posted @ 2021-12-24 15:15 Hey,Coder!
阅读(138)
评论(0)
推荐(0)
2021年12月17日
使用BaGet搭建私有nuget源
摘要: 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)
2021年12月16日
.net5 Expression扩展
摘要: 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
下一页
公告