上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 65 下一页
摘要: 1、在上下文里重载OnModelCreating: //没用到这个方法 protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.HasDefaultSchema("这里写你的Oracle用 阅读全文
posted @ 2017-01-01 19:46 94cool 阅读(1637) 评论(0) 推荐(1)
摘要: MongoDB查询转对象是出错Element '_id' does not match any field or property of class 解决方法: 1、在实体类加:[BsonIgnoreExtraElements] 2、或者定义public ObjectId _id { get; set; } 例子: [BsonIgnoreExtraElements] public... 阅读全文
posted @ 2016-12-28 17:12 94cool 阅读(4433) 评论(0) 推荐(1)
摘要: var srcTbl = "20161226"; var destTbl = "20161226-bak"; 方式一: MongoClient client; MongoServer server; MongoDatabase db; MongoClientSettings setting = new MongoClientSettings(); settin... 阅读全文
posted @ 2016-12-28 14:17 94cool 阅读(2073) 评论(0) 推荐(0)
摘要: class Program { static string mongodb = "mongodb://127.0.0.1:27017"; static string database = "dbCardInfo"; static string tblName = "fcd1"; static Mon 阅读全文
posted @ 2016-12-22 09:16 94cool 阅读(1081) 评论(0) 推荐(0)
摘要: c# (ENUM)枚举组合类型的谷歌序列化Protobuf,必须在序列化/反序列化时加上下面: RuntimeTypeModel.Default[typeof(Alarm)].EnumPassthru = true; [ProtoContract] class LbsItem { [ProtoMember(1)] pub... 阅读全文
posted @ 2016-12-21 16:09 94cool 阅读(2284) 评论(0) 推荐(0)
摘要: 必须JobManager初始化 方式1: public void Start() { JobManager.AddJob(() => FetchingData(), schedule => { schedule.ToRunEvery(1).Days().At(10, 8); ... 阅读全文
posted @ 2016-12-20 10:22 94cool 阅读(2253) 评论(0) 推荐(0)
摘要: from:http://www.data321.com/shujuku/20160514417/addToSetQianMianBuXuYaoJinXing 插入文档: SQL语句: INSERT INTO 表名 (列名.......) VALUES(对应的列值.........); MongoDB语句: db.集合名.insert({键:值,键:值,键:值.......... 阅读全文
posted @ 2016-12-16 11:54 94cool 阅读(2030) 评论(0) 推荐(0)
摘要: 1、EF生成的sql语句,用 parameter 进行传值,所以不会有sql注入问题 2、EF下有涉及外部输入参数传值的,禁止使用EF直接执行sql命令方式,使用实体 SQL 参考: https://msdn.microsoft.com/zh-cn/library/cc716760(v=vs.110).aspx 防范 SQL 注入式攻击。 应用程序经常接受外部输入(... 阅读全文
posted @ 2016-12-14 16:31 94cool 阅读(2657) 评论(0) 推荐(0)
摘要: 部署: 1、安装vc_redist.x64vc_redist.x64 2、安装DotNetCore.1.0.0.RC2-WindowsHosting 3、安装DotNetCore.1.0.0-SDK.Preview2-x64 4、控制台命令执行:dotnet -version,确认是否执行成功。成功则Net.Core安装完成 5、发布参考:IIS上部署Net.Core 阅读全文
posted @ 2016-12-13 15:09 94cool 阅读(1890) 评论(0) 推荐(0)
摘要: c# 调用C++的dll报错 Attempted to read or write protected memory: 原因是:c# 传递Null的string值导致的,将Null改为string.empty即可 阅读全文
posted @ 2016-12-06 09:07 94cool 阅读(1441) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 65 下一页