随笔分类 -  netcore

摘要:1: public class HomeController : Controller { public ActionResult Index() { ViewBag.pclass = this; // 通过ViewBag把this指针传给视图, return View(); } public st 阅读全文
posted @ 2019-07-23 09:42 枫- 阅读(5193) 评论(0) 推荐(0)
摘要:安装使用: 1:下载nuget包 Confluent.Kafka librdkafka.redist System.Runtime.CompilerServices.Unsafe 基于.net实现kafka的消息队列应用,常用的类库有kafka-net,Confluent.Kafka,官网推荐使用C 阅读全文
posted @ 2019-05-13 17:56 枫- 阅读(1672) 评论(0) 推荐(1)
摘要:ViewComponent1、View 组件介绍在ASP.NET CORE MVC中,View组件有点类似于partial views,但是他们更强大,View组件不能使用model binding,当你调用它的时候仅仅依赖与你提供的数据一个View组件特点: .呈现一大块而不是一个整体的响应。 . 阅读全文
posted @ 2019-05-06 12:06 枫- 阅读(234) 评论(0) 推荐(0)
摘要:配置: 1:NuGet程序包 - 搜索log4net - 安装 2:配置代码 Startup文件 #region log4 public static ILoggerRepository repository { get; set; } #endregion public Startup(IConf 阅读全文
posted @ 2019-04-25 11:51 枫- 阅读(127) 评论(0) 推荐(0)
摘要:步骤一、 Nuget Packages安装,使用程序包管理器控制台,安装命令:Install-Package Swashbuckle.AspNetCore -Pre 步骤二、 在Startup 文件中添加配置: 阅读全文
posted @ 2019-04-22 15:47 枫- 阅读(207) 评论(0) 推荐(0)
摘要:1:const,readonly,和get访问器,三者都可在自己的生命域里赋值,但是编译器也是可以在构造函数里进行初始化赋值的 2:Debugger.IsAttached 属性 http://msdn.microsoft.com/zh-cn/library/system.diagnostics.de 阅读全文
posted @ 2019-04-19 17:10 枫- 阅读(708) 评论(0) 推荐(0)
摘要:IIS方式: 1:iis配置netcore发布的文件 2:iis设置运行库无托管模式 3:安装DotNetCore.1.0.4_1.1.1-WindowsHosting.exe 4:安装dotnet-hosting-2.2.2-win.exe https://dotnet.microsoft.com 阅读全文
posted @ 2019-04-19 10:17 枫- 阅读(441) 评论(0) 推荐(0)
摘要:转载部分: https://www.cnblogs.com/edisonchou/p/integrated_performance_monitoring_foundation.html ConfigureServices下添加: #region AppMetrics添加 bool isOpenMet 阅读全文
posted @ 2019-04-18 14:24 枫- 阅读(280) 评论(0) 推荐(0)
摘要:https://www.jexus.org/ 阅读全文
posted @ 2019-04-18 10:50 枫- 阅读(129) 评论(0) 推荐(0)
摘要:using ZhiHe.Entity.Corpize;using System;using System.IO;using System.IO.Compression;using System.Net;using System.Net.Http;using System.Net.Http.Heade 阅读全文
posted @ 2019-04-15 18:43 枫- 阅读(176) 评论(0) 推荐(0)
摘要:转载:https://www.cnblogs.com/landonzeng/p/7904402.html .Net Core 2.0+ InfluxDB+Grafana+App Metrics 实现跨平台的实时性能监控 一、简介# 最近这段时间一直在忙,没时间写博客,负责了一个项目,从前端到后端一直 阅读全文
posted @ 2019-04-15 18:10 枫- 阅读(387) 评论(0) 推荐(0)