会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
CRLF
Write The CODE,Change The World!
首页
新随笔
联系
管理
上一页
1
···
26
27
28
29
30
31
32
33
34
···
52
下一页
2022年1月10日
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!
阅读(1047)
评论(0)
推荐(1)
2021年12月30日
自动生成仓储结构、实体结构 T4模板
摘要: 使用T4模板自动生成需要的数据库实体类、仓储类、仓储接口 代码 提供的项目 AutoInfrastructGenerate - 提供基础生成实体(实体基础结构-不读取数据库-可手动扩展读取特定数据库实体类型)、仓储 -T4模板 GenEntities-Mysql - 读取mysql中的表自动生成实体
阅读全文
posted @ 2021-12-30 16:30 Hey,Coder!
阅读(182)
评论(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!
阅读(230)
评论(0)
推荐(0)
c#通过表达式获取调用的属性名称 & 动态获取列表中特定字段的数据
摘要: 获取表达式调用的字段名称 /// <summary> /// 获取表达式调用的字段名称 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="expr"></param> /// <returns></returns
阅读全文
posted @ 2021-12-24 15:15 Hey,Coder!
阅读(166)
评论(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!
阅读(156)
评论(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!
阅读(147)
评论(0)
推荐(0)
2021年12月15日
.net5 .net6 WebAPI 参数验证 模型验证 ModelValid 接口参数校验 统一返回结构
摘要: .net5 利用InvalidModelStateResponseFactory 官网推荐做法 覆盖ModelState管理的默认行为,只有在数据验证失败时才会执行 services.Configure<ApiBehaviorOptions>(options => { options.Invalid
阅读全文
posted @ 2021-12-15 16:30 Hey,Coder!
阅读(368)
评论(0)
推荐(0)
.net5 过滤器返回通用结构 swagger使用IApplicationModelProvider自动化添加ProducesResponseType
摘要: 创建通用返回结构及忽略特性 public class ResultData<T> { public int ret {get;set;} public string msg {get;set;} public T Data { get; set; } } public class ApiIgnore
阅读全文
posted @ 2021-12-15 09:16 Hey,Coder!
阅读(358)
评论(0)
推荐(0)
2021年11月30日
wpf 放大后Path线宽不一致
摘要: 解决方法:将变化应用到几何形状本身而不是Path <Path Data="M 0 0 20 100 30 0 40 100 50 100 60 0" Stroke="Black" Canvas.Top="20"> <Path.RenderTransform> <ScaleTransform Scal
阅读全文
posted @ 2021-11-30 13:25 Hey,Coder!
阅读(255)
评论(0)
推荐(0)
2021年11月17日
wpf usercontrol封装公共基类
摘要: 创建普通类而不是usercontrl,然后继承usercontrol public abstract class PureBaseUserControl : UserControl { } 修改子类的usercontrol继承上面的基类(需要改两处) 将子类的前台代码最外侧的改为上面的基类(注意下方
阅读全文
posted @ 2021-11-17 14:18 Hey,Coder!
阅读(478)
评论(0)
推荐(0)
上一页
1
···
26
27
28
29
30
31
32
33
34
···
52
下一页
公告