12 2015 档案

摘要:\\192.168.33.122\迅雷下载 迅雷下载为文件夹名称 阅读全文
posted @ 2015-12-24 15:05 甜菜波波 阅读(229) 评论(0) 推荐(0) 编辑
摘要:create table #ttt(id int,name nvarchar(10));merge into #ttt t using (select 1 as id ,'eee' as name ) b on (t.id = b.id) when matched then update set t... 阅读全文
posted @ 2015-12-23 15:37 甜菜波波 阅读(1418) 评论(0) 推荐(0) 编辑
摘要:整理了一下表达式树的一些东西,入门足够了先从ConstantExpression开始一步一步的来吧 它表示具有常量值的表达式我们选建一个控制台应用程序ConstantExpression _constExp = Expression.Constant("aaa",typeof(string));//... 阅读全文
posted @ 2015-12-21 14:18 甜菜波波 阅读(15424) 评论(0) 推荐(3) 编辑
摘要:1.关于C# Lambda Expressions:一个Lambda Expression (译为Lambda式) 就是一个包含若干表达式和语句的匿名函数。可以被用作创建委托对象或表达式树类型。所有的Lambda式都使用操作符“=>“,表示“goes to (转变为)”。操作符左边部分是输入参数表,... 阅读全文
posted @ 2015-12-21 11:15 甜菜波波 阅读(1037) 评论(0) 推荐(0) 编辑
摘要:--方法1DECLARE @Table NVARCHAR(30)DECLARE tmpCur CURSOR FORSELECT name FROM sys.objects WHERE TYPE='U' AND name LIKE N'HSUPA%'OPEN tmpCurFETCH NEXT FROM... 阅读全文
posted @ 2015-12-16 10:17 甜菜波波 阅读(1237) 评论(0) 推荐(0) 编辑
摘要:out: 输出(作为结果),in:输入(作为参数)所以如果有一个泛型参数标记为out,则代表它是用来输出的,只能作为结果返回,而如果有一个泛型参数标记为in,则代表它是用来输入的,也就是它只能作为参数。逆变不能作为返回类型只能作为参数类型,协变可以作为返回类型但不能作为参数类型 阅读全文
posted @ 2015-12-11 17:54 甜菜波波 阅读(169) 评论(0) 推荐(0) 编辑
摘要:1.引用命名空间 using AutoMapper;using AutoMapper.Mappers;2.实体类和dto public class Order { public int orderid { get; set; } public decimal amo... 阅读全文
posted @ 2015-12-11 15:38 甜菜波波 阅读(856) 评论(0) 推荐(0) 编辑
摘要:msdn 解释如下:“协变”是指能够使用与原始指定的派生类型相比,派生程度更大的类型。“逆变”则是指能够使用派生程度更小的类型。解释的很正确,大致就是这样,不过不够直白。直白的理解:“协变”->”和谐的变”->”很自然的变化”->string->object :协变。“逆变”->”逆常的变”->”不... 阅读全文
posted @ 2015-12-11 14:15 甜菜波波 阅读(212) 评论(0) 推荐(0) 编辑
摘要:命名空间:using System.Data.Objects;var query = db.TxtRes.Join(db.LangRes, a => new { id1 = a.ResID, id2 = a.ResID }, b => new { id1=b.ID,id2=b.ID }, (a, b... 阅读全文
posted @ 2015-12-10 11:42 甜菜波波 阅读(1257) 评论(0) 推荐(0) 编辑
摘要:sql 版:SELECT [t0].[OrderID], [t0].[CustomerID], [t0].[EmployeeID], [t0].[OrderDate], [t0].[RequiredDate], [t0].[ShippedDate], [t0].[ShipVia], [t0].[Fr... 阅读全文
posted @ 2015-12-10 11:30 甜菜波波 阅读(2590) 评论(0) 推荐(0) 编辑
摘要:var customers = DB.Customer.Join(DB.Commission,cst => cst.CommissionId,com => com.CommissionId, (cst, com) => new Customer(){CommissionId = com.Commis... 阅读全文
posted @ 2015-12-09 18:54 甜菜波波 阅读(2018) 评论(0) 推荐(1) 编辑
摘要:在.Net 中,程序集(Assembly)中保存了元数据(MetaData)信息,因此就可以通过分析元数据来获取程序集中的内容,比如类,方法,属性等,这大大方便了在运行时去动态创建实例。MSDN解释如下: 反射提供了封装程序集、模块和类型的对象(Type 类型)。可以使用反射动态创建类型的实例... 阅读全文
posted @ 2015-12-09 18:29 甜菜波波 阅读(208) 评论(0) 推荐(0) 编辑
摘要:alert 效果:{"a":"aaaa","nick":"ccccc","keyword":"ccccc"}后台可以使用NewTonJson.net 接收json字符串 阅读全文
posted @ 2015-12-08 10:47 甜菜波波 阅读(3780) 评论(0) 推荐(0) 编辑
摘要:json字符串转json对象:jQuery.parseJSON(jsonStr);json对象转json字符串:JSON.stringify(jsonObj);IE中可能对unicode使用“\uXXXX”格式来编码,可以使用如下来解码:function unicode2Char(str) {ret... 阅读全文
posted @ 2015-12-08 10:44 甜菜波波 阅读(1272) 评论(0) 推荐(0) 编辑
摘要:1.引用“Newtonsoft.Json” 4.0 版本2.基础类using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace NewTonJsonTest{ public ... 阅读全文
posted @ 2015-12-08 10:23 甜菜波波 阅读(2541) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示