.Net
hangyejiadao
这个作者很懒,什么都没留下…
展开
-
【无标题】青云配置appsetting.json
青云配置文件原创 2023-01-06 17:28:27 · 166 阅读 · 0 评论 -
【无标题】abp微服务之间调用token传递
123原创 2022-10-27 17:45:55 · 533 阅读 · 4 评论 -
grpc helper
using System;using System.IO;using System.Net;using System.Net.Sockets;using pb = global::Google.Protobuf;namespace Aquila.WarSimulator.Server.V1.Runtime.Utilities;public class NetworkHelper { public NetworkHelper () { // _dispatcher = D原创 2022-05-11 13:24:16 · 168 阅读 · 0 评论 -
【无标题】
Ocelot配置{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", "Routes": [ { //上游Api请求格式 "UpstreamPathTemplate": "/api/customer/{controller}/{action}",原创 2021-12-12 17:34:30 · 1368 阅读 · 0 评论 -
abp vnext自定义claim
using Microsoft.AspNetCore.Http;using Microsoft.AspNetCore.Identity;using Microsoft.Extensions.Options;using System;using System.Linq;using System.Security.Claims;using System.Threading.Tasks;using Volo.Abp.DependencyInjection;using Volo.Abp.Ident.原创 2021-02-20 12:50:29 · 747 阅读 · 0 评论 -
mvc里的AutoMapper的帮助类
using System;using System.Collections;using System.Collections.Generic;using System.Data;using System.Linq;using System.Reflection;using System.Web;using System.Web.Mvc;using AutoMapper;usin...原创 2018-03-01 09:31:33 · 678 阅读 · 0 评论 -
c#SqlHelper
using System.Configuration;namespace DBUtility{ using Powertech.Model; using System; using System.Collections; using System.Collections.Generic; using System.Data; using Sys原创 2018-01-10 13:36:02 · 348 阅读 · 0 评论 -
c#模拟http请求类
public class HttpHelper { public static string Request(string url, Dictionary args, Encoding encoding, Dictionary headers = null, HttpMethod method = HttpMethod.POST, string co原创 2018-01-17 14:12:34 · 684 阅读 · 0 评论 -
c#深拷贝帮助类
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Linq.Expressions;using System.Reflection;using System.Runtime.Serialization;using System.Runtime.Ser原创 2018-02-01 10:42:21 · 480 阅读 · 0 评论 -
注册dll到系统
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 自动添加批处理文件管理员权限 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::原创 2017-11-28 14:47:57 · 1427 阅读 · 0 评论 -
安装服务的命令
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe xxx.exeNet Start xxxsc config xxx start= auto原创 2017-11-15 11:02:03 · 980 阅读 · 0 评论 -
winform 只能输入整数或小数
private void cmbGczj_KeyPress(object sender, KeyPressEventArgs e) { var control = sender as Control; if (control.Text.Length > 1) { if (cont原创 2017-11-02 16:42:18 · 483 阅读 · 0 评论 -
c#Task的continuewith
Console.WriteLine("123"); Task task = new Task(() => { for (int i = 0; i < 20; i++) { Console.WriteLine("i");原创 2017-10-31 11:51:26 · 4442 阅读 · 3 评论 -
webapi生成验证码
前台 $('#codeimage').attr("src", "@CommonAddress.SecurityCode?date=" + new Date().toISOString());后台: [System.Web.Http.HttpGet] public void SecurityCode([FromUri]DateTime date) ...原创 2018-03-16 12:13:22 · 4062 阅读 · 0 评论 -
空间类型和函数不可用于此提供程序,因为未能找到程序集“Microsoft.SqlServer.Types”版本 10 或更高版本。
ef迁移时报这个错 然后通过nuget安装Microsoft.SqlServer.Types还是报这个错 后来仔细看了一哈安装Microsoft.SqlServer.Types的说明于是把这段代码添加到Context的构造函数里 SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirect...原创 2018-03-25 09:51:00 · 1777 阅读 · 3 评论 -
asp.net 或mvc清除浏览器缓存
webform protected void Application_End(object sender, EventArgs e) { Response.Buffer = true; Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1); ...原创 2019-05-20 11:32:20 · 1640 阅读 · 0 评论 -
Lambda 帮助类
using System;using System.Collections.Generic;using System.Linq.Expressions;using System.Text;namespace Infrastructure{ /// <summary> /// Lambda extensions /// </summary&g...原创 2019-03-16 19:59:47 · 203 阅读 · 0 评论 -
log4Net配置
<?xml version="1.0" encoding="utf-8"?><configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"原创 2019-01-15 11:03:27 · 148 阅读 · 0 评论 -
NPOI导出Excel设置单元高度自适应
public class ExcelAHelper { /// <summary> /// List转Excel /// </summary> /// <typeparam name="T"></typeparam> /// <param name="l...原创 2018-12-04 17:51:17 · 4324 阅读 · 1 评论 -
visual studio 配置发布选择文件
原创 2018-10-18 07:36:58 · 897 阅读 · 0 评论 -
Log4Net配置
<log4net> <!--存提示消息--> <appender name="RollingFile" type="log4net.Appender.RollingFileAppender"> <file value="OpertionLog/Info/" /> <ap原创 2018-09-24 20:43:02 · 285 阅读 · 0 评论 -
lambda 和表达式树对应的多条件关联查询
var a = from m in cx.Set<A>() join q in cx.Set<B>() on new { Id = m.Id, EId = m.Ext } equals new { Id = q.BId, EId = q.BExt } ...原创 2018-08-30 22:53:28 · 2857 阅读 · 0 评论 -
EF_Expression
using System;using System.Collections.Generic;using System.Collections.ObjectModel;using System.Linq;using System.Linq.Expressions;using System.Reflection;using System.Text;namespace ECP.Util...原创 2018-07-17 22:55:51 · 704 阅读 · 0 评论 -
NPOI实现数据库导出到Excel Excel添加到数据库(适用2003 2007)
using System;using System.Collections.Generic;using System.Data;using System.IO;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using NPOI.HSSF.UserModel原创 2017-08-14 13:23:43 · 962 阅读 · 0 评论 -
关于HtmlAgilityPack无法解析html
xPath明明是从浏览器拷贝下来的 htmlAgilityPack却解析不了 原来从浏览器拷贝下来的xpath有时会不准去 所以htmlAgilityPack解析不了 只有自己手写或者从HtmlDocument加载下来的html代码后找到你所要的节点 然后找到对应的xpath原创 2017-07-29 09:53:01 · 409 阅读 · 0 评论 -
上传图片及添加水印一般处理程序的
context.Response.ContentType = "text/html"; HttpPostedFile file = context.Request.Files["Imag"]; string path = AppDomain.CurrentDomain.BaseDirectory + file.FileName;原创 2017-08-10 14:06:44 · 307 阅读 · 0 评论 -
关于asp.net mvc 渐进式ajax无法加载OnSuccess回调函数
引入多个JQuery,导致版本冲突原创 2016-11-24 09:20:07 · 715 阅读 · 0 评论 -
Json序列化反序列化
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;using Newtonsoft.Json;using System.Web.Script.Serialization;names原创 2016-12-02 15:08:57 · 328 阅读 · 0 评论 -
Dynamic &&ExpandoObject
using System;using System.Collections.Generic;using System.Dynamic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace DynamicObject{ class WroxDynamicObject : Syste原创 2016-11-20 09:37:35 · 278 阅读 · 0 评论 -
LINQ zip
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace zip{ class Program { static void Main(string[] args)原创 2016-11-19 20:15:01 · 803 阅读 · 0 评论 -
OfType的用法
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication2{ class Program { static void Main(st原创 2016-11-19 15:03:35 · 718 阅读 · 0 评论 -
c#合并两个数组方法
byte[] b1 = new byte[] { 1, 2, 3, 4, 5 }; byte[] b2 = new byte[] { 6, 7, 8, 9 }; byte[] b3 = new byte[b1.Length + b2.Length]; char[] b4 = new char[] { '1', '2', '3'转载 2016-12-10 11:13:37 · 10895 阅读 · 0 评论 -
验证码类
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Drawing;using System.Web.UI;using System.Drawing.Drawing2D;using System.IO;using System.Drawing.Im原创 2016-11-18 08:04:49 · 205 阅读 · 0 评论 -
System.Data.Entity.Core.MetadataException类型的异常在EntityFramework.dll中发生
...但未在用户代码中进行处理。其他信息:无法加载指定的元数据资源原创 2016-11-17 20:45:11 · 10017 阅读 · 2 评论 -
带参数的sqlHelper
using System;using System.Collections.Generic;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Text;using System.Threading.Tasks;namespa原创 2016-11-10 14:05:48 · 383 阅读 · 0 评论 -
params (C# Reference)
The params keyword lets you specify a method parameter that takes a variable number of arguments.You can send a comma-separated list of arguments of the type specified in the parameter declarati转载 2016-11-10 13:40:58 · 522 阅读 · 0 评论 -
JsonHelper
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Web.Script.Serialization;using Newtonsoft.Json;namespace IOSerialize原创 2016-11-26 21:23:48 · 319 阅读 · 0 评论 -
用递归获取子文件夹
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;namespace IOSerialize.IO{ public class Recursion {原创 2016-11-26 21:45:01 · 259 阅读 · 0 评论 -
c#微信服务器配置
public string CheckSign() { var httpMethod = Request.HttpMethod.ToLower(); string httpString = string.Empty; if (httpMethod == "get") {原创 2017-08-02 18:29:48 · 670 阅读 · 0 评论 -
Asp: GridView分页
protected void gv_Xm_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView gv = (GridView)sender; if (e.NewPageIndex<0) { System.Web.UI.原创 2017-05-10 11:09:23 · 412 阅读 · 0 评论