当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

10 2019 档案

摘要:run->cmd 阅读全文
posted @ 2019-10-30 20:58 hofmann 阅读(2071) 评论(0) 推荐(0)
摘要:/// /// Get SHA512 Hash From String /// /// /// static public string GetHash512String(string originalData) { string result = st... 阅读全文
posted @ 2019-10-30 17:16 hofmann 阅读(1676) 评论(0) 推荐(0)
摘要:string pcname = Dns.GetHostName(); string ip = Dns.GetHostAddresses(pcname).First().ToString(); using Com.AppCode.Extend; using Com.AppCode.Helper; using System.Collections.Generic; using System.Net; 阅读全文
posted @ 2019-10-30 17:11 hofmann 阅读(579) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Web.Script.Serialization; using System.Xml; using System.Xml.Serialization; namespace Com.AppCode.Hel... 阅读全文
posted @ 2019-10-30 16:58 hofmann 阅读(690) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Web.Script.Serialization; namespace Com.AppC... 阅读全文
posted @ 2019-10-30 16:54 hofmann 阅读(763) 评论(0) 推荐(0)
摘要:using System; using System.Diagnostics; using System.IO; using System.Threading; using System.Web; namespace Com.AppCode.Helper { /// <summary> /// 日志记录到本地文件 /// </summary> public class Log { /// <sum 阅读全文
posted @ 2019-10-30 16:51 hofmann 阅读(666) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace Com.AppCode.Extend { sta... 阅读全文
posted @ 2019-10-30 16:48 hofmann 阅读(389) 评论(0) 推荐(0)
摘要:using System; namespace Com.AppCode.Extend { public static partial class Ext { #region 数值转换 /// /// 转换为整型 /// /// 数据 public static int ToInt... 阅读全文
posted @ 2019-10-30 16:33 hofmann 阅读(734) 评论(0) 推荐(0)
摘要:管理员角色运行cmd.exe,执行上边脚本;在 Component -> Services 找到 CCGSQueueService 服务,可以启动/停止服务。 阅读全文
posted @ 2019-10-29 15:25 hofmann 阅读(904) 评论(0) 推荐(0)
摘要:在 vs tools:Developer Command Prompt For VS2019/2017 里执行上边命令。 阅读全文
posted @ 2019-10-29 15:21 hofmann 阅读(379) 评论(0) 推荐(0)
摘要:https://code.visualstudio.com/docs/?dv=win 阅读全文
posted @ 2019-10-29 14:41 hofmann 阅读(371) 评论(0) 推荐(0)
摘要:static public string SerializeToXml(T obj) { string xmlString = string.Empty; //XmlSerializer xmlSerializer = new XmlSerializer(typeof(T)); //using... 阅读全文
posted @ 2019-10-29 09:39 hofmann 阅读(423) 评论(0) 推荐(0)
摘要:/// /// 适用于初始化新实体 /// static public T RotationMapping(S s) { T target = Activator.CreateInstance(); var originalObj = s.GetType(); ... 阅读全文
posted @ 2019-10-29 09:35 hofmann 阅读(801) 评论(0) 推荐(0)
摘要:private EntityCollection<T> ToEntityCollection<T>(this List<T> list) where T : class { EntityCollection<T> entityCollection = new EntityCollection<T>(); list.ForEach(entityCollection.Add); return enti 阅读全文
posted @ 2019-10-28 10:27 hofmann 阅读(1831) 评论(1) 推荐(0)
摘要:该对象上下文实例已被释放,不能用于需要连接的操作。 shared context per request模式,缩短Entity实例的存在时间和降低Entity实例的共享性,并考虑性能,因为Entity需要手动Dispose。 不能使用单例模式,静态方法就可以。 阅读全文
posted @ 2019-10-28 09:56 hofmann 阅读(408) 评论(0) 推荐(0)
摘要:/// /// 适用于初始化新实体 /// static public T RotationMapping(S s) { T target = Activator.CreateInstance(); var originalObj = s.GetType(); ... 阅读全文
posted @ 2019-10-25 14:34 hofmann 阅读(1675) 评论(0) 推荐(0)
摘要:原因:添加实体时“代码生成策略” 的值是为 “T4” 解决办法:在”关系图“空白处,即.edmx文件里的空白处右键选属性,找到“代码生成策略”,将值“T4”改为“Legacy ObjectContext”,保存后.Desiger.cs文件中就生成代码了。 同时删除多余的.Context.tt和.tt 阅读全文
posted @ 2019-10-24 15:18 hofmann 阅读(536) 评论(0) 推荐(0)
摘要:string name = Dns.GetHostName(); string ip = Dns.GetHostAddresses(name).First().ToString(); 阅读全文
posted @ 2019-10-16 13:12 hofmann 阅读(203) 评论(0) 推荐(0)
摘要:DateTime start = DateTime.Now.AddDays(-20); DateTime end = DateTime.Now; TimeSpan ts = end.Subtract(start); double days = ts.TotalDays; int differentD... 阅读全文
posted @ 2019-10-15 10:18 hofmann 阅读(2603) 评论(0) 推荐(0)
摘要:枚举定义 枚举操作方法 测试 阅读全文
posted @ 2019-10-15 10:17 hofmann 阅读(1701) 评论(0) 推荐(0)
摘要:DataContractJsonSerializer dataSerializer = new DataContractJsonSerializer(request.getBizContentClass()); MemoryStream msObj = new MemoryStream(); dat 阅读全文
posted @ 2019-10-09 10:53 hofmann 阅读(506) 评论(0) 推荐(0)
摘要:https://www.microsoft.com/zh-cn/sql-server/sql-server-editions-express https://docs.microsoft.com/zh-cn/sql/ssms/download-sql-server-management-studio 阅读全文
posted @ 2019-10-08 22:33 hofmann 阅读(900) 评论(0) 推荐(0)