2022年7月19日
摘要: 给定一个特定DateTime值,我如何显示相对时间,例如: 2小时前 3天前 一个月前 学到一个方法,巧妙的对比 public static string RelativeDate(DateTime theDate) { string result = string.Empty; Dictionar 阅读全文
posted @ 2022-07-19 13:14 Yang_zi 阅读(28) 评论(0) 推荐(0) 编辑
  2019年1月17日
摘要: 1, 引用第三方包, Swashbuckle.AspNetCore Swashbuckle.AspNetCore.Swagger Swashbuckle.AspNetCore.SwaggerUI 最简单方法复制: 2. startup.cs 3 4. Controllers 对外action 加上请 阅读全文
posted @ 2019-01-17 17:17 Yang_zi 阅读(319) 评论(0) 推荐(0) 编辑
  2018年7月24日
摘要: 微软的eshop项目写的很牛,学起来也比较吃力,最近公司刚好有一本书,说的就是.NET微服务,记下来。 因为微软对性能的要求,docker里面要有内存要求 解释下这句代码的意思: 然后你就成功了.... 阅读全文
posted @ 2018-07-24 17:16 Yang_zi 阅读(751) 评论(3) 推荐(0) 编辑
  2012年11月8日
摘要: using (IServiceProxy<IPackageService> c = ServiceFactory.GetProxy<IPackageService>()) { IList<EcSaleItem> ec = null; var dto = c.Proxy.GetPackage(); if (dto != null && dto.Count > 0) { foreach (var item in dto) { drpServiceType.Items.Add(new ListItem(item.Description, it 阅读全文
posted @ 2012-11-08 20:00 Yang_zi 阅读(152) 评论(0) 推荐(0) 编辑