06 2013 档案

摘要:在设置了时间的默认值getdate(),新增一条数据仍为null。使用sql语句insert并无此问题,但使用linq to sql出现问题。解决方案:http://msdn.microsoft.com/zh-cn/library/system.data.linq.mapping.columnattribute.isdbgenerated.aspx [Column(Storage="_OrderID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=tru 阅读全文
posted @ 2013-06-14 15:04 Uoolo 阅读(1164) 评论(0) 推荐(0)
摘要:参考:http://blog.csdn.net/q107770540/article/details/6133484private static object GetPropertyValue(object obj, string property){ System.Reflection.PropertyInfo propertyInfo=obj.GetType().GetProperty(property); return propertyInfo.GetValue(obj, null);}主要用到以上方法。obj为要排序的对象,property为参数。一般linq查询出来的数据... 阅读全文
posted @ 2013-06-07 09:54 Uoolo 阅读(348) 评论(0) 推荐(0)